PIC with bcd switch and 2x16 LCD

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,777
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 17, 2009

PIC16F887 Microcontroller and 2x16 LCD. The MCU reads a 9 state hex thumbwheel switch. and presents the result as an integer on the LCD. For some reason it reads the right value only intermittent and seems very sensitive to other electric fields? I've gone through the soldering and wiring, and everything seems right. I've seen similar errors with much simpler projects as well.
If you have any idea of what might be the issue, please help me!
Thanks!

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (quietsounds)

  • Looking forward to try a PIC - according to the comments, there are no internal controlled pull-ups in PIC chips, unlike an AVR, yep?

  • @TheBypasser There's been a while since I did any pic programming, but as I recall, there are internal pull-ups on some of the pins. However, they can be to weak in certain applications. When the pins are left not tied to either ground or VDD, they are easily stimulated by any electromagnetic field e.g the presence of your hand hovering above it.

  • Yes! I asked a question about this problem on a forum, and they gave me the same solution. As I am using the pins in IN-LOW mode, i mounted pull-up resistors to VDD +5V and of course it worked right away! Thanks for the tip! No more "loose ends" for me in the future...:-)

see all

All Comments (6)

Sign In or Sign Up now to post a comment!
  • @quietsounds Interesting! Why I asked is because the AVR MCUs I work with all have internal optional 1kOhm pull-up on every pin, one can be enabled if needed by simply writing 1 to the corresponding PORTxN bit while the DDRxN bit is set to 0 (input pin mode); if both PORTxN and DDRxN are set to 0 the pin acts as a high-impedance input. 1k is more then enough so whenever you need some sort of a mechanic or optocoupled switch in your device, you can just rig it pin-to-pin, with no additional parts

  • You have forgotten to mount pull-down resistors. One resistor at each input-pin down to GND will do it! choose something between 10kΩ up to 100kΩ and it will fix your problem.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more