Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. void main(void){
  2. int j;
  3. TRISB=TRISB & 0xfc00;
  4.  
  5. LATBbits.LATB8=0;
  6. LATBbits.LATB9=1;
  7. static const unsigned char codes[]={0x4, 0x2, 0x1, 0x8, 0x10, 0x20, 0x40};
  8. while(1){
  9. for(j=0; j<7; j++){
  10. LATB= (LATB & 0xff00) | codes[j];
  11. delay(200);
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement