Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD Text File Display --- "Electronic Book"

Status
Not open for further replies.

joe_e

New Member
Hello everyone and thank you for taking the time to read my post. I just registered at this forum after having being bitten by the "project bug" in the past few weeks. I've got a bit of am ambitious(I think?) project that I'd like some advice on, and I'd appreciate it a lot if you'd be of service to me.

Project: A portable device with an LCD displayer, some sort of controller chip(PIC, STAMP, whatever), and storage by means of a compact flash drive(ie; re-formatted digital camera disk) or, preferrably, a "key" USB flash drive. A simple text file of whatever format would be stored on the drive and the controller chip would read X characters at a time from the text file(8, 16, or whatever the display width of the character LCD is) and display a different set of those characters to each line of the LCD display, corresponding to the text file. There would be an UP and DOWN button which would redraw the screen and essentially "turn the page". In order to display the information, I am thinking it would be possible to either display directly what is on the flash drive, or to transfer X bits at a time to the device's memory and display it from there.

The information I'd like to know is how exactly I would go about building this device. I've done a bit of searching but I've come up short in finding other people who've completed similar projects. I assume this device could be built very similar to a portable MP3 player, but my knowledge is pretty limited. My basic underlying question is: will I need any special hardware to "decode" the ASCII text or can it be done simply through software programming onto the chip?

Any information at all, no matter how "newbie-fied" that you can provide related to this project would be warmly accepted and very appreciated. Information that would especially be appreciated are any links related to a project like this. I am a newbie to the electronics scene, but I have some experience in software programming and basic exposure to electronics. While I have no formal education in electronics, I am a very fast learner, especially when confronted with a challenge. Any information you provide will be put to good use.

Thank you very much,
-Joe
 
Also, if anybody could provide me with links to educational Basic Stamp/etc info sites or popular forums for them I'd be very grateful.

Thanks again.
-Joe
 
Wow, you should really learn to walk before running dude!


OK, if i was tasked to do this project i'd do this:

PC -> USB -> PIC processor -> Graphics display (like nokia phones)

Pic also connects to the compact flash.



For the PC to download the file(s) and talk to the processor, i'd use the FT2332BM USB chip, look it up on **broken link removed** This allows writing to it just like a normal serial port.

PC software would talk to this chip, and to the microprocessor via a custom protocal.


Next, the processor will connect to the USB chip, flash card, switches, display.

I used a graphics display so you can display several lines of text at the same time, just like mobile phone text messages.

I have also seen chips arround that can "speak" the text you give it... just a thought.

If i was you, i would look at:

www.picant.com ('C' compiler for PIC processors)
www.microchip.com (PIC processors)
 
If you just want it to contain text then i would suggest using parallel eeprom as the storage. It is a LOT! simpler to use then compactflash. Parallel eeprom is smaller then compactflash, but they are available up to a MB as far as i know of, that's a whole lot of ascii text (a complete book).

compactflash isn't worth the trouble for something like this...

I agree on using the FT2332BM chip for usb communications, It's the simplest way to communicate over usb, It won't be fast, but then again, not much microcontrollers (and eeprom) can handle the speed of usb anyway.
 
Thanks a LOT for the great information, guys! This is exactly the type of detailed info I was looking for. You have both been a great help in getting me started with this project. I know I am in over my head, but that's okay with me, as this is the way I learn the best....I really can't stand those functionless "learning" projects anyway. I don't plan on having this done in a weekend or even a week or probably even a month, if ever. I just hope to learn from my experiences and maybe some day I will have enough knowledge to complete it. For the time being, though, it sure sounds like a lot of fun to try. My own personal "Hitchhiker's Guide to the Galaxy". So thanks again for indulging me in this learning experience.

I will use the EEPROM like you said, and I agree, it does sound a lot easier. As long as I am using that, I guess there is no need for the USB any more, which I only wanted to use as USB Flash "keychain" storage(you've seen them in the Best Buy ads) anyway. Since that is out of the picture, I can just use a Parallel cable directly connected to the EEPROM. Initially I didn't want to do this for usage simplicity's sake in being able to quickly/easily change books since I could use the USB "keychain" storage very easily without any sort of special flashing software. However, that does make it much more complicated, and at this point, it'd probably be very much easier for me to build if I just flashed the EEPROM with each new book I wanted. This leads me to my next questions:

-- How many times can I flash it before it no longer functions?
-- Would it be better to have an easily removable chip and a seperate flashing device connected to the PC, or a flashing device "built-in" to the "book"?
-- And exactly how should I do this setup? Would it be EEPROM--->PIC--->LCD ?

Thanks again for any info you can supply. You've already clarified and solidified this idea very much for me. It sounds much more easily attainable now and that makes it even more exciting for me.

-Joe
 
joe_e said:
-- How many times can I flash it before it no longer functions?
Most eeproms can be reprogrammed up to a million times...

joe_e said:
-- Would it be better to have an easily removable chip and a seperate flashing device connected to the PC, or a flashing device "built-in" to the "book"?
I would build in the USB interface, like you intended to, using the fdti chip already mentioned it is as easy as RS232 communications, you could just plug your 'book' into a usb port and upload new text.
PC software can be written in visual basic or any language you like with serial port (COM port) support.
That's what the FT2332BM chip does, it fools your pc software into thinking the USB port is a com port, wich makes it easy to program...

joe_e said:
-- And exactly how should I do this setup? Would it be EEPROM--->PIC--->LCD ?
PC -> FT2332BM -> PIC (for pc communications)
EEPROM -> PIC
LCD -> PIC
BUTTONS -> PIC

As you can see, the pic handles it all ...

As for the eeprom, There are serial (I²C) eeproms too wich go up to a megabyte (and more), as displaying text on a lcd doesn't require much speed you could use such a serial eeprom, wich are cheaper.
They are slower then parallel, but you don't need the speed to read your book anyway, on the other side, a parallel eeprom will be faster when downloading new text to the device from the pc. It's a tradeoff you'll have to make for yourself...

And what to expect from a megabyte, well, i don't have any books handy, but to give a little example, I've got the Quake2 C sourcecode here (pure ascii text). I took some files togheter wich gave me 256Kb and that was about 12000 lines of code..
Of course, there's nothing stopping you from using 2 chips and doubling the capacity
 
Thanks again for the great info and great idea about serial eeprom-->USB. I am getting more and more excited about this project as it seems more and more feasible.


I've already been looking at CrystalFontz(http://www.crystalfontz.com/products/2004l/index.html#CFAH2004LYYBJP) 20x4 backlit LCDs. They seem to be just the right size(123mmx43mm viewable) and have tall 9.22mm characters for easy readability. This LCD will require 8 or 10 I/O pins from the chip, I am not sure.

I also checked out the Atmel AT25P1024 serial EEPROM chip at the Atmel web site(http://www.atmel.com/dyn/products/product_card.asp?part_id=2495) and it seems suitable, but I'd be grateful if somebody could confirm that for me. I believe that this EEPROM will require 7 I/O pins from the PIC.

For a PIC I was looking at the 16F628(**broken link removed**), with 16 I/O pins. Since I am not sure if the LCD wiring will require 8 or 10 I/O pins, and I believe the AT25P1024 Serial EEPROM requires 7 I/O pins, this may or not be suitable from that viewpoint. From a functional viewpoint, I have no idea if this would be a desirable PIC or not. If there are not enough I/O pins, I assume that I would move up to a 16F876A(**broken link removed**)PIC, which has 22 I/O pins, but again, I really am not sure if this would be suitable. I would imagine that the buttons I will need will also require I/O pins and thus the 16F876A is probably what I will need to go with, but I am a clueless newb, after all.

If you can please offer your comments on my hardware choices, that'd be great. You guys have already answered many of my questions and set me well on my way, and I really appreciate it. I will try to stop asking so many questions as I get further along and reach a baseline at which I have the knowledge to do my own research on the subject via Google.

-Joe
 
Have a look at my PIC tutorials for LCD connections, I use 4 bit mode, to limit the number of pins used, and hardware timing - this makes it as fast as possible. For two line LCD's my code uses 7 I/O pins on the PIC, for a four line one you will probably need 8 pins (usually a four line one is simply 2, two line ones, joined together).

The USB chip mentioned is simply a USB to RS232 converter, you could simply connect the PIC via RS232 and save the initial cost of the USB chip. You could very easily add it later, without having to alter your code at all.

So with a 16F628, you would require 8 pins for the LCD, either 2 or 1 pin for RS232 (depending if you want two way communication or not, probably best to though!). You would also need two pins for I2C, again see my tutorials. This leaves 4 pins (or 5), you could use these for switches and LED's - this would probably be enough.
 
Thanks for the response, Nigel. I have already bookmarked your tutorials and plan on reading them ASAP. I've taken a quick look at some tutorials and they seem very informative, and exactly the type of information I am seeking.

I must admit that I am a bit confused about your reply, however. Are you suggesting that I connect the USB/RS232 directly to the PIC and write to the external 1MB EEPROM via the PIC? Or should I simply wire the USB/RS232 directly to the external EEPROM and write to it via the PC, bypassing the PIC? If the latter were the case, the PIC would not need to write to the external EEPROM, correct? Would this make things any simpler?

Also, I would connect the external EEPROM to the PIC via I2C, or?

Last thing; I mistyped the information about the LCD screen, as it is a 2 line display after all. The 4 line displays are nice, but they are so big as to be bulky, IMO. Not that it matters, but I just thought I'd clarify. <---- edit: Ugh...I didn't mistype the info after all. I decided on the 20x4 line display, and it was my brain that misfired, not my fingers. It's been a long day.

Thanks again and I look forward to using your great tutorials and code, Nigel!

-Joe
 
I don't know if this is what you're going for, but I was just reading slashdot today and I found this. Some guy bought an LED sign, hooked it up to his computer, and got it to display text from web pages. I think he released the source on his scripts, but I'm not sure.
 
joe_e said:
I must admit that I am a bit confused about your reply, however. Are you suggesting that I connect the USB/RS232 directly to the PIC and write to the external 1MB EEPROM via the PIC? Or should I simply wire the USB/RS232 directly to the external EEPROM and write to it via the PC, bypassing the PIC? If the latter were the case, the PIC would not need to write to the external EEPROM, correct? Would this make things any simpler?

Also, I would connect the external EEPROM to the PIC via I2C, or?

Yes, you connect the EEPROM via I2C to the PIC - how else could the PIC read from it?.

As it's already connected to the PIC it makes sense to use the PIC to write to it as well, other wise you would need an EEPROM programmer to load the EEPROM. So you transfer data from the PC to the PIC, which writes it into the EEPROM. Writing EEPROM is fairly slow, so you would need somekind of handshaking to the PC - sending in 8 or 16 byte 'packets' and waiting for comfirmation would be an easy way.
 
what are the brands that have paralell memory..

and how fast can you read from a i2c / paralell eeprom..

??

TKS :eek:
 
TKS said:
what are the brands that have paralell memory..

and how fast can you read from a i2c / paralell eeprom..

Parallel EEPROM's are fairly rare, and obviously much larger than I2C ones.

Reading from an I2C EEPROM works at the speed of the I2C interface, writing though is much slower - you have to wait for the write to complete. Most I2C EEPROM's allow you to preload a number of bytes, then do a single write - this speeds writing considerably. Full details are in the datasheets.
 
joe_e said:
I also checked out the Atmel AT25P1024 serial EEPROM chip at the Atmel web site(http://www.atmel.com/dyn/products/product_card.asp?part_id=2495) and it seems suitable, but I'd be grateful if somebody could confirm that for me. I believe that this EEPROM will require 7 I/O pins from the PIC.
That EEPROM is 1MegaBIT in size, not a MegaByte. Its approximately 1million bits, not bytes, wich makes it only 130Kb in size, wich is rather small. You would need an eeprom of 8Megabit, that would be a 1Mb...
 
thanks..

for ansering but

@ which rate works the fastest i2c @ the moment..??

400Kbit/sec..????

i also have sampled a pic whit 1ms write cycle..but it is of a small capp...

TKS
 
Oops. Beginner's mistake:)

In that case, are there any 8Mb EEPROMs out there that would fit my project and that anybody could recommend? Or would it be easier to either stack multiple, smaller EEPROMs or even use the dreaded flash drive?
 
Thanks again for the info, Exo.

I stumbled across this site http://www.compsys1.com/workbench/On_top_of_the_Bench/MMC_Project/mmc_project.html. It offers SD(Secure Digital) card and MMC(MultiMedia Card) support via serial interface with a PIC. It seems as though this could be the answer to my problem.

While I could pay ~$60 for the MMC/SD developer's kit, which includes "a PIC16F876, a Max233 (or equiv), an LM2937 3.3v regulator, SMD resistors, a 10Mhz resonator and a FM24CL64 FRAM plus the DB9 connector, SD and IC sockets, reset switch", would it also be possible for me to simply buy the MMC pcb and socket and simply interface it with my own PIC and LCD? Because I would not be writing to the MMC/SD storage with the device directly(for simplicity's sake, I'd format and write to it via the PC), would that also mean that I would not need any external EEPROM? Just the MMC socket/PCB + PIC + LCD? The vendor also supplies demo source code for the PIC, though I believe he charges for code to interface with Fat 16 format MMC.

A similar device made by Rogue Robotics can be found here: **broken link removed**.

This sounds too good to be true, and I am not holding my breath. Would anyone kindly offer an opinion on this product, please? If this would be feasible, I would like to persue it.

Thanks yet again,
-Joe
 
joe_e said:
I've already been looking at CrystalFontz(https://www.crystalfontz.com/products/2004l/index.html#CFAH2004LYYBJP) 20x4 backlit LCDs.

Eee... those look a bit expensive to me. But, I don't know anything about your budget either. Here, have a look at these. Double the space and much cheaper. https://www.allelectronics.com/cgi-bin/category.cgi?category=365&item=LCD-85&type=store What do you think? Ok, ok... it's not backlit, but you might be able to add a backlight.

Edit: Scratch that. Look at THESE ones. These one's are backlit. https://www.allelectronics.com/cgi-bin/category.cgi?category=365&item=LCD-91&type=store You only have to pay a few bucks more for the backlight. :wink:

Second edit: And also, you can use these: https://www.allelectronics.com/cgi-bin/category.cgi?category=365&item=LCD-101&type=store to get even more text on there. It might be harder, but you can use custom font sizes to make it smaller and fit more text. Just because it's only text doesn't mean you have to stay with a text-only lcd. :wink: But... if it were me, i'd still go with the 40x4 text lcd so as not to complicate things. But... that's just me.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top