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.

external memory

Status
Not open for further replies.

Ricardoco

New Member
I am looking at doing a project with a color display and i would like to use several backgrounds with as many colours as possible but the 16f877 i intend to use has too little memory to store all the picture data, is there a way to conect external memory to the pic so that the picture data can be stored off pic. a basic answer would be nice with an example diagram if that is not too cheeky :roll: but any input is better than none :p
 
I2C Hmmmm tell me more.... :D Show me an example if you can
 
I2C EEPROM's are fairly slow, but probably fast enough for that - how much do you need to store?, and is it read only?.

EPE did a World Clock a while back, storing all the map data in the program memory as tables.
 
Its an protocol for transfering data.

It uses 2 wires one is clock and the other one is data.Its half duplex wich means data can only go one way at a time and not bouth ways at the same time.But they can comunicte bouth ways.

This bus in not known for speead but then agen EEPROMs are slow too.

There is also an bus caled SPI wich is known for high speead.

You can also stack EEPROMs on a single I2C bus by using the enable pins.You can stack 8 on a single buss giving you 4Mbits (512KB) of space

Parallel EEPROMs are extremly pin hungry. To store that much you need 9 adress pins and 8 data pins plus the 2 Controll pins adds up 19 pins!
 
I2C only takes 2 wires and 2 external pullup resistors. The protocol can be handled by bit-banging in the code- many examples of this- and some PICs have an I2C hardware module. The hardware module certainly allows the code to run faster, but it is a rather poorly documented module (very atypical of Microchip to do this) and the hardware itself has a number of errata pertaining to many of its revisions.

Also don't forget there are other PICs with much more memory.

If I may ask, what kind of color display do you have there, and how are you driving it? I've long wanted to use a color display but the cost effective options are quite limited.
 
Ok this is the picture i would like to have as a background and the other will be the overlay it will just tell me the wind direction with reference to the boat the display is 132x132 pixels with a possible 4096 colors.. got the display from www.display3000.com
 

Attachments

  • bground.jpg
    bground.jpg
    5.4 KB · Views: 902
  • overlay_197.jpg
    overlay_197.jpg
    12 KB · Views: 911
Have you got the display working yet?.

In either case, I would suggest you check out the EPE graphic LCD articles, details on graphic LCD's are very scarce!.
 
Im wading through all the documentation they sent me at the moment but they do provide very extensive documentation if you want to have a look at it i will send it too you (actually nigel it is sent so you got mail) and oznog im not so bold as to send you a mail too as i would not be so presumptious
 
Why would you want to store 8 nearly similar images in the PIC as the changes is only the little red arrows? You only need to store 4 images of the red arrow(without the ship & background, size 8x8 pixels perhaps) as you can then get the rest from these 4 by mirroring.

Or you can "calculate" the arrow shape using programming and don't have to store anything.

You can also use the Program Memory to store these images if you really "have to store them".

From Display FAQ: As you normally change only these parts of the screen which has been changed (thanks for the display RAM) you have to transfer only these data - all the other remain unchanged and does not need to be transferred again. By doing it this way you may update critical data on the screen 10-20 times a second. Usually this is too much and does take processor time.

Reading the above FAQs of the display would suggest sending background pixel to erase the existing arrow from the display's internal display RAM and sending new pixel data for the new arrow position indication.

At least this what I think how it is done.
 
So each picture shod have 17424 pixles.And there are a litle les than 9 colors so its 3 bits per pixel an that makes 52 272 Bits for 1 picture.
So 512Kbit EEPROM cod store 9 such pictures.
 
Ok eblc138 i totaly agree this was an example set of images only. the images i would like to use are for a management system on board a boat and there are several backgrounds, this was only clear in my first post and the example pictures I chose were perhaps not the best ones, but before i throw myself into doing all the pictures i must find out what the memory constraints of the project will be thus dictating how many colors i can use and how the images will be constructed, as you will may know from drawing pictures in a high resolution then saving them in a low resolution sometimes the picture gets totaly messed up... and that can make you wild if you have spent many hours doing the images :oops: (speaks the voice of experience) , so i thought i would try and find out what memory configurations were available. :D and hopefully how to implement them diagramaticaly.
 
As for pics with more memory has anyone got any suggestions i would prefere something similar to the f877 as ive programmed this before and have a programmer that it fits real nice :lol: but i am open to suggestions
 
The 40-pin 18F4620 comes to mind with it's 64-kbytes (32-kwords) flash memory... And unlike the 16F877 you'll find you can store two 8-bit bytes of data into each 'word' of flash memory when using tables...

It might seem intimidating to jump into the 18F' devices but I suspect you'll find it's really pretty easy and a lot more intuitive than you might think...

Good luck with your project... Regards, Mike
 
Thanks mike :lol: , So other than the extra memory what other effect would there be if i moved to the 18 series, Im assuming by its pin out that it will program in my programmer in exactly the same way with exactly the same software, if this is the case what would the other major differences be. Even so it appears that memory constraints will force me to design my backgrounds from a common template and only change the pixels that need changing to give the new background (as pointed out to me earlier in this post), im not sure where to start learning this type of programming so any links to examples i can read would be great.. :D
 
What do you think about using the 18F4680
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top