futz
Active Member
After getting my LCD working on Junebug, I started thinking of ways to make it useful for something other than displaying the usual demo stuff. First thing I thought of was to display VR1 and VR2 values. Of course that's impossible because the LCD is using the RA1 and RA3 pins.
It became obvious that it would be best if the LCD could move to PortB. I went over the board and schematic and realized that to get all the PortB pins to the LCD would mean a rat's nest of wiring. PortB is scattered all over the Junebug board, and RB0, 2 and 5 aren't brought out to a connector at all.
So I thought to myself, "Self, wouldn't it be nice if PortB was pinned out all in one place? Hey! I think I'll do that!"
So I added a PortB connector, bringing all the easily useful PortB pins (0 - 6) to it. Here's some pics of the project:
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
The hot-melt glue over the connector is just for extra insurance. The connector was squished into hot-melt and was nice and strong already.
I made a minor mistake (thinking upside down) and built it with pin 0 on the left instead of where it should be, on the right. If I was to do it again I would fix that so the pin order corresponds to where the bits are in PORTB. Ah well, no big deal. Just plug it in upside down.
Another thing I should have done was put 5V and ground on the connector. By the time I thought of it I was half done. Next time...
Here's **broken link removed** for a quicky test program that just cycles thru the pins, turning each one on for 2 seconds and off for 2 seconds. Good for putting a meter on each pin to be sure you got it right. LED #1 lights when pin 0 is high.
One gotcha is that you have to solder to the correct pin on the switches. Looking at the bottom of the board, only the right pin is connected.
While using the header don't forget that the buttons will probably cause trouble if you push them while using the pins for something else. Your software and/or outboard hardware may not appreciate this.
I haven't connected up my LCD and rewritten my code yet. Maybe tomorrow night.
It became obvious that it would be best if the LCD could move to PortB. I went over the board and schematic and realized that to get all the PortB pins to the LCD would mean a rat's nest of wiring. PortB is scattered all over the Junebug board, and RB0, 2 and 5 aren't brought out to a connector at all.
So I thought to myself, "Self, wouldn't it be nice if PortB was pinned out all in one place? Hey! I think I'll do that!"
So I added a PortB connector, bringing all the easily useful PortB pins (0 - 6) to it. Here's some pics of the project:
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**
The hot-melt glue over the connector is just for extra insurance. The connector was squished into hot-melt and was nice and strong already.
I made a minor mistake (thinking upside down) and built it with pin 0 on the left instead of where it should be, on the right. If I was to do it again I would fix that so the pin order corresponds to where the bits are in PORTB. Ah well, no big deal. Just plug it in upside down.
Another thing I should have done was put 5V and ground on the connector. By the time I thought of it I was half done. Next time...
Here's **broken link removed** for a quicky test program that just cycles thru the pins, turning each one on for 2 seconds and off for 2 seconds. Good for putting a meter on each pin to be sure you got it right. LED #1 lights when pin 0 is high.
One gotcha is that you have to solder to the correct pin on the switches. Looking at the bottom of the board, only the right pin is connected.
While using the header don't forget that the buttons will probably cause trouble if you push them while using the pins for something else. Your software and/or outboard hardware may not appreciate this.
I haven't connected up my LCD and rewritten my code yet. Maybe tomorrow night.