PJ Smith -
Thanks for looking at our site.
As to your questions, one more thing you could check:
You didn't mention which PIC you are using...but i noticed some of your LCD pins are on port E...this is no problem, however, Port E on the 16F877A are Analog pins (when set to analog, pin can not output...only input, so must be changed to digital!) You can do this by setting your ADCON1 regester. e.g....to make all analog pins digital on the 16F877A type:
ADCON1 = 7
Also check your TRIS statements (1 = input, 0 = output)
If you need some of these set as analog, no problem, just look in the data sheet to set as desired
You have to set bits 3,2,1,& 0 to match your desired A or D
'***ADCON1 Register for 16F877A***
'Bit 7 => ADFM: A/D Result format select
' 1 = Right Justified. 6 most significant bits of ' ADRESH are read as 0.
' 0 = Left Justified. 6 least significant bits of ' ' ADRESL are read as 0.
'Bit 6 => Unimplemented: Read as 0
'Bit 5 => Unimplemented: Read as 0
'Bit 4 => Unimplemented: Read as 0
'Bit 3 => PCFG3 A/D Port Configuration Control bits
'Bit 2 => PCFG2 A/D Port Configuration Control bits
'Bit 1 => PCFG1 A/D Port Configuration Control bits
'Bit 0 => PCFG0 A/D Port Configuration Control bits
Check this to make sure you are ok.
Best of luck...
Carl
www.schellelectronics.com




Bookmarks