Shouldn't that read: TRISB =3D 00001100; on the PIC 0 =3D Output, 1 =3D Input On 24 October 2011 14:36, Yigit Turgut wrote: > Hi everyone, > > My I/O is supposed to be as the following ; > > AN0 =A0>> analog input > RB0 >> digital output (initially low) > RB1 >> digital output (initially low) > RB2 >> digital input (initially high / pulldown pushbutton) > RB3 >> digital input (initially high / pulldown pushbutton) > RB4 >> digital output (initially high) > > > And skeleton of the code is ; > > sbit MOTR at RB0_bit; > sbit MOTL at RB1_bit; > sbit BTN1 at RB2_bit; > sbit BTN2 at RB3_bit; > sbit BTN3 at RB4_bit; > > void main() { > > TRISA =3D 10000000; > ADCON1 =3D 10000000; > TRISB =3D 00110001; > PORTB =3D00111001; > > } > > I checked a couple of times but can't seem to spot the mistyped bit. > RB2,RB3 and RB4 should be high when circuit is powered but they are > all low. Any ideas ? > > Have a nice day! > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .