Using The 12F Family for LCD Displays and Other Questions

Discussion in 'Embedded Systems and Microcontrollers' started by ajm113, Jun 9, 2011.

  1. ajm113

    Thread Starter Member

    Feb 19, 2011
    176
    5
    Alright I have a 12F675 and I programmed with it using BASIC and I'm pretty happy I have my first microcontroller working. :) I'm thinking on expanding my little project and getting the most out of that little microcontroller. :)

    So what I'm thinking I should do next is to get it to display some text for debugging/fun reasons. :) Then build a mini computer with a tiny OS around the small LCD. ;)

    I found some nice LCD displays on jameco.com like this one:
    http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_150957_-1

    Anyways I want to of course get the most out of the PIC so if there is a way to only use 1-3 ports out of that PIC I'm happy. :) I'll let a low volt 555/556 timer(s) worry about the backlighting and LCD power when idling too long.

    As for my questions:

    1. Is there a LCD driver IC I can use to save pins to print data to the LCD screen I can use for the 12F?

    2. Are there any examples with easy to read example code that uses EEPROM ICs with PICs? I was thinking I could allow the user to save maybe 5 notes that are 100 characters or under.

    3. Are 12Fs good at communicating with VGA monitors for small info printing?
     
  2. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Probably the most important thing you can do is upgrade from the 12F675 to a PIC that has more pins. If you like the simplicity of the little 12F675 then the 16F628A is very similar, but it has enough pins to drive the LCD directly which requires 6 PIC output pins.

    If you get familiar with the 12F675 and 16F628A there are an enormous amount of projects on the internet that use these two great little chips.

    If you google for "PIC 16F628 + LCD" you should find a heap of projects showing how to interface the PIC to the LCD. :)
     
  3. be80be

    Senior Member

    Jul 5, 2008
    432
    57
    Use serial rs232 display some text for debugging that would only take 1 pin
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    Geeze, 70 bucks for that thing? Check them out on EBay, unless you can't wait for Chinese ground shipping (2-3 weeks) for a display that will cost you 1/10 that price. It looks like a nice display but these things get way overpriced on their way thru distribution.

    LCD displays all pretty much work the same way, they need 3 or 4 control lines and 4 or 8 data lines. That's 7 minimum (or 6? I forget exactly) and a lot of pins.

    Microchip has a library for LCDs, search out their Maestro, but pretty much everyone has a ton of trouble getting one to work the first time.

    Some LCDs come with a built in I2C or RS232 interface So you only need 1 or 2 pins. Alternatgively you can get an I/O Expander from Microchip to grow your pin count. The Maestro only works with the direct to LCD connection.

    Again pretty common, but depends on what type of EEPROM, I2C, SPI, etc. If code not in the Maestro then you may be able to borrow code from the Basic Stamp which is how I learned to read an EEPROM.


    That code has under 2K of memory and crawls for 5M instructions/sec. I'm currently using a PIC32MX460512 core with 128K memory & 80M instructions/sec that I've seen a design where it outputs a black & white VGA signal. And while it can run a USB host making it possible to communicate with a printer I wouldn't want it to compose anything. (My previous 2-3 projects all used PIC12F615's in case you think I don't know the little cores).

    Dude, you have a teeny tiny controller there. It would make an excellent central processor for any microwave oven or coffee pot. It would also serve nicely in a clock. Anything more and you need a bigger chip.
     
  5. nickelflipper

    Active Member

    Jun 2, 2010
    280
    35
    Here is a serial lcd kit based on the PH Anderson chip. As mentioned, it's easier, and cheaper to go with a PIC that has more pins.
     
  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    Nice find, display plus serial adapter kit for 28 or 32 USD is hard to beat!
     
  7. be80be

    Senior Member

    Jul 5, 2008
    432
    57
  8. ajm113

    Thread Starter Member

    Feb 19, 2011
    176
    5
    Well I guest I can step it up a bit since that tiny processor is best for simple "clock" functions. :) I'm going to use my 16F684 since its what I have at the time being and I may change it to a 18F2550 if I decide to upgrade the features of my "Pocket PC". ;)

    Plus I think it would be neat to add more dynamic features.

    About the LCDs, I may go the ebay route then and go with a 16x2 instead. I found a LCD pretty cheap here:
    http://cgi.ebay.com/HD44780-1602-16...ltDomain_0&hash=item336808776c#ht_2718wt_1139

    I don't mind using all the bit pins on the LCD if I have a 14 pin Microcontroller then. I'll still have room to add features I wish to add which is important. :)

    About the EEPROM I'm guesting it's just like sending data with any other PIC? But using the correct pins for communication on my 16F pretty much?
     
Loading...