Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: adanvasco on June 15, 2011, 08:06:01 AM
-
Hi everyone. I recently got a sample LCD from Purdy Electronics http://www.purdyelectronics.com/products/displays/intchar.cfm (http://www.purdyelectronics.com/products/displays/intchar.cfm) (please use wisely ;)) and have been trying to connect it to the $50 robot.
My problem is that I need to use 4 consecutive ports ie. PB0 - PB3. This is a requirement of the library I'm using which can be found here http://extremeelectronics.co.in/avr-tutorials/using-lcd-module-with-avrs/ (http://extremeelectronics.co.in/avr-tutorials/using-lcd-module-with-avrs/). I could use the C port but I would have to sacrifice most of my ADC ports then.
So this is the question: can I use ports PB0 - PB3 which are currently being used to connect the hardware programmer? I know I'm not going to use the programmer while using the LCD, but I would have to configure port PB3 as output since PB0 - PB2 are currently not being used. So, changing PB3 to output would interfere with the programmer?
I forgot to mention, I'm using an ATmega8. I'm also open to new ways to achieve this. If you know of another library or a better way of doing this, please shout out!
BTW, the LCD is huge!!! It's almost an inch wider than my bot. It measures 4 1/2" by 1 3/4" by 3/5". But as we used to say in Cuba: "a caballo regalao' no se le mira el colmillo" ("Don't look a gift horse in the mouth")
Thanks.
-
Hi,
So this is the question: can I use ports PB0 - PB3 which are currently being used to connect the hardware programmer? I know I'm not going to use the programmer while using the LCD, but I would have to configure port PB3 as output since PB0 - PB2 are currently not being used. So, changing PB3 to output would interfere with the programmer?
On the PIC you can use the programming pins, but need to "isolate" the lines a bit if they're used as output with lowish impedance loads - this is only when using ICSP, if you program it out of the board (like on a solderless breadboard), they can be used freely without any precautions.
I'd assume the same goes with AVR's (as long as you don't use a boot loader of course).
BTW, the LCD is huge!!! It's almost an inch wider than my bot. It measures 4 1/2" by 1 3/4" by 3/5". But as we used to say in Cuba: "a caballo regalao' no se le mira el colmillo" ("Don't look a gift horse in the mouth")
Especially when you selected the model yourself :D
You could have gone for a 1x8 and you wouldn't have had that problem ;)
-
Great! Thanks.
Especially when you selected the model yourself :D
You could have gone for a 1x8 and you wouldn't have had that problem ;)
Yeah, I just got greedy ;D. They actually have a smaller 2x16. I really didn't look at the physical dimensions as I (incorrectly) thought the size would be the same; dependant only on the number of characters. Now I know.
It actually came out better than I expected.
(http://i56.tinypic.com/1zyako2.jpg)
(http://i55.tinypic.com/1hd07l.jpg)
Thanks again Soeren.
-
I like your Bot.
-
Thank you. I used an old floppy disk drive case as the frame which is not very sturdy but at the same time is easy enough to work with. For the wheels I used two lemonade bottle caps. I was on a really tight budget and I think I managed to it make for around $30.
I actually got the LCD working ;D
(http://i1142.photobucket.com/albums/n613/adanvasco/06151903.jpg)
Edit: Forgot one more thing. The caster I took it from a mini roll-on perfume bottle.
-
Or you can use this two wires configuration
(http://www.scienceprog.com/wp-content/uploads/LCDSerial/2WLCD.png) (http://www.scienceprog.com/interfacing-lcd-to-atmega-using-two-wires/)
http://www.scienceprog.com/interfacing-lcd-to-atmega-using-two-wires/ (http://www.scienceprog.com/interfacing-lcd-to-atmega-using-two-wires/)
http://code.google.com/p/arduinoshiftreglcd/ (http://code.google.com/p/arduinoshiftreglcd/)
-
Good deal! I actually thought of getting a serial LCD but were not available (not 100% sure) as samples. And they are way more expensive than the regular ones.
But this looks pretty interesting. It'll give it a try on my breadboard and see what comes out.
Thanks a lot!