May 17, 2011 #1 B b_engine Newbie level 1 Joined May 17, 2011 Messages 1 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,287 Hi, why is it difficult to use bin0 of all ports as a digital input in pic 16f877a I tried this simple code and it doesn't work right : Code: void main() { trisb.b0=1; trisd.b0=0; portd.b0=0; portb.b0=0; while(1){ portd.b0 = portb.b0;}} but if i changed portb.b0 to portb.b1 it works fine , is there a different way to work with b0? I'd be glad if someone can help.
Hi, why is it difficult to use bin0 of all ports as a digital input in pic 16f877a I tried this simple code and it doesn't work right : Code: void main() { trisb.b0=1; trisd.b0=0; portd.b0=0; portb.b0=0; while(1){ portd.b0 = portb.b0;}} but if i changed portb.b0 to portb.b1 it works fine , is there a different way to work with b0? I'd be glad if someone can help.
May 18, 2011 #2 B boyguitar1 Member level 1 Joined Nov 8, 2010 Messages 33 Helped 12 Reputation 24 Reaction score 12 Trophy points 1,288 Activity points 1,486 hi b_engine Code: void main() { trisb.b0=1; // set RB0 as input trisd.b0=0; // set RD0 as Output portd.b0=0; // clear portd bit 0 portb.b0=0; // clear portb bit 0 while(1) { portd.b0 = portb.b0; } } This case I tried apply 5V by using active high to RB0 It's normally work!! PortD has Level high 5V make LED light!
hi b_engine Code: void main() { trisb.b0=1; // set RB0 as input trisd.b0=0; // set RD0 as Output portd.b0=0; // clear portd bit 0 portb.b0=0; // clear portb bit 0 while(1) { portd.b0 = portb.b0; } } This case I tried apply 5V by using active high to RB0 It's normally work!! PortD has Level high 5V make LED light!
May 18, 2011 #3 ibitechs2005 Member level 3 Joined Mar 25, 2009 Messages 56 Helped 2 Reputation 4 Reaction score 1 Trophy points 1,288 Location GB Activity points 1,582 Please i want to know how to write to microcontroller EEPROM.Any special tools to do this?