while (PINB.0!=0); //wait for ack while (PINB.0==0);
// PORTC.0=0; //-----------> my led is on, so my init is success? }
// External Interrupt 0 service routine interrupt [EXT_INT0] void ext_int0_isr(void) { // PORTC.0=0; // ----> my led is on, so my interrupt 0 is work at falling edge while (PIND.2==0); for (i=0;i<8;++i){ while (PIND.2==1); data=data|PINB.0; while (PIND.2==0); data=data<<1; }
// Global enable interrupts #asm("sei") DDRC=0xFF; PORTC=0xFF;
n=0; count=0; mouse_init(); while (1) {
while(data != 0xFA) {PORTC=data;} //----> my PORTC is say 0b11111110 or sometime 0b01111110 is never 0b11111010... why? while(data != 0xAA); while(data != 0x00);
} } ----------------------------
why i never received ack data from mice? that's i missed something?
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.