Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main() {
- int value;
- int counter=0;
- ansel=0;
- anselh=0;
- trisa=0x00;
- trisb=0x00;
- porta=0x00;
- value=0b10000000;
- while(1){
- if(value==0){
- value=0b10000000;
- counter=0;
- }
- porta = value;
- if(counter==2){
- value = value >> 1;
- counter = 0;
- } else {
- value = value << 1;
- counter++;
- }
- Delay_ms(20);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement