|
Post by donburch on Jan 11, 2007 20:42:34 GMT 10
I just bought a "16 character x 2 lines LCD module" from Dick Smith, thinking that a mobile robot will need more than a couple of LEDs to indicate its status - particularly while debugging.
At first look, the module may need 8 I/O pins from the controller in order to give 4-bit data bus ... I guess that's OK for a proof of concept; but in the long-term I wouldn't want to dedicate so many pins to a secondary accessory.
I'm sure some of you will say to whip up a trivial electronic circuit (beyond my electronics knowledge), and others will say to use a simple PIC or AVR processor.
On another tangent, I've decided that basing a robot on one fast CPU is not a good idea. Too easy for it to get bogged down processing (or for the OS to hang) and it simply fails to respond to the sensors or interrupts.
Instead, I'm thinking of a series of controllers for the low level functions (and I'm unsure whether the Propeller would even be particularly suitable) with a serial bus for communication, and a main CPU for the "intellectual" tasks like analyzing video images or determining best route.
So it seems sensible that I should interface the LCD module to the Basic Stamp/BoE via a serial bus. So that will be another project.
|
|
|
Post by michaelg on Jan 12, 2007 8:57:22 GMT 10
Hi donburch,
Ive previously done a project to connect a 16x2 LCD module to a PIC.
I used the half mode, but as u say it still does use up alot of pins.
The next time I need to use the 16x2 module though I will use a 74HC595 shift register - this only requires 3 pins, and you can daisy chain more shift registers together if u need even more pins. I've used this technique to control lots of LED's - it works great.
Hope that helps, Michael
|
|
|
Post by Robotman on Jan 15, 2007 8:59:30 GMT 10
Hi Don Even I am finding it hard to find time to do robot stuff, what with all the other little chores that being married, with children brings! Your idea about distributed processing is a good one, because you can off-load a lot the motor bit-banging functions into 8-pin uC's or even an a larger uC to control maybe 4 or so motors at a time, and connect them all with an I2C bus or some other "open-drain / open-collector" style communications channel (you don't want to have two serial ports per uC, one for incoming comms and the other for relaying of comms not addressed to this uC). Possibly another serial comms bus could be like that used by Multimedia and SD cards - shared clock, shared data, and a "chip-select" per device... The bigger, faster uC's can then do the high-level intelligent processing. The LCD module you bought from Tricky Dicky doesn't have serial comms built into it, so you're going to have to attach a PIC (or AVR), or as michaelg suggested, using a 74HC595 shift register. Visit www.myke.com/lcd.htm and scroll down near the bottom for a circuit to do this. Also see www.myke.com/code/2wirepic.asm for the source code. Otherwise, I'll send you a circuit I created (for use in my beer brewing temperature controller I built for a friend) and the PIC code for it. When you feel ready to buy some electronics components Don (and maybe some tools to go with them!) drop me an email or give me a call if you still have my number (I've still got your mobile so reply back here if you want me to call you). Oh, and if your CPU gets bogged down then you'll need to teach yourself all about real-time processing, and if your OS hangs then its probably time to thoroughly debug the debugging you just did. And that's the least of your worries as your robot is now a smashing rolling brain dead lump of metal that's gunna do some hurtin' ;-) Cheers
|
|
|
Post by donburch on Jan 23, 2007 21:11:24 GMT 10
As usual botman, you make me feel like a lazy schoolboy ... by making it all seem so easy ;-) Now I've got no excuse for not interfacing this display.
As far as the serial comms goes ... coming from Application programming I feel familiar with using (note: not building) RS-232 - however the research I've done suggests that RS-232 is not what I want. Also I'm thinking that a master/multi-slave configuration requires that the Master is always active and in control.
So I'm thinking that a bus is more appropriate, where any device can send and receive messages independently.
|
|
|
Post by Robotman on Jan 24, 2007 14:20:07 GMT 10
Hi Don Sorry 'bout making you feel lazy - 'tis not my intention to do that! I'm thinking that the I2C bus is what you're looking for and Circuit Cellar has a good article about it. Checkout: www.circuitcellar.com/chipcenter-pdfs/0302/c0302dc.pdffor the PDF (which contains source code in the article), or archive.chipcenter.com/circuitcellar/march02/c0302dc6.htmwhich has links to both the PDF and a separate source code ZIP. This covers the physical and data link layers, but you will have to implement the rest of the "network" layers yourself. Philips have their I2C specification document (v2.1) at: www.nxp.com/acrobat_download/literature/9398/39340011.pdfThe I2C bus can be driven by a single master (this is the easiest to implement, and probably the best one to use in most circumstances), or it can configured for multi-master - but then you get collisions just like Ethernet and your code that's in all your connected devices becomes really more complex. On the Propeller: I think this chip is best used as either 1) The brains (intelligence, interactivity generator) and combined device (motors, lights, etc.) controller in a toy, or 2) As a "hub" that brings together all the different components of a robots' sub-systems and acts much like the thalamus in the brain - relaying and integrating. And I don't get why Parallax think that having a video generator in a uC is a good thing! Why not a UART, SPI or I2C interface instead? Or, maybe a multi-channel ADC. This would be far more useful... Cheers for now
|
|
|
Post by DSFDFS on Aug 14, 2008 18:25:19 GMT 10
|
|
|
Post by SDFSD on Aug 14, 2008 18:27:28 GMT 10
|
|
|
Post by SDFSD on Aug 14, 2008 18:29:06 GMT 10
|
|
|
Post by DFSSF on Aug 14, 2008 18:30:55 GMT 10
I also know that when that decision is made you want to be on the road to a training program as soon as possible. free online games.Just remember that choosing a Training program for yourself and the dog is as important as choosing. play war games.a college. free online war games.You will need to know a lot about. online games.the program and what you really need from a specific Guide Dog school.
|
|