
Originally Posted by
flotulopex;91900
So, if I get it right, I should program something like this:
1.- set CS low = select the display as SPI target
2.- set RS low = select the "instruction" register
3.- send instructions = send "instructions" to the display (cursor position, clear, etc.)
4.- set RS high = select the "data" register
5.- send data = "HELLO WORLD"
6.- set CS high = unselect the target
Unfortunately, I'm in the office now and will have to be patient until tonight to try this [img
http://www.websmileys.com/sm/sad/1346.gif[/img]
Meanwhile, if this process is somehow correct, how do I send a bunch of "instructions" or "datas" to the display? Is it a single "instr./data" @ the time? If "no", how do I send more than one info? Do I need to repeat all the steps?
What about the timings? In some examples I could find, one can see 25µs fudge factor? What is this for?
Last but not least: are my PIC settings correct in order to make the SSP work?
Yes, you need to pull RS low to send commands and high to send data.
About the timming you should be fine. According to the ST7036 datasheet page 55, the data bit set up time, Tsds, is around 10 nsecs. So, you should be ok. A "fudge factor" is a mathematical tool to force a result to be what we want it to be. So, I don't really know what they mean by this 25 us fudge factor. Maybe they are making the bit timming to be 25 usecs long.
I would try sending any data by using a combination of HIGH and LOW for the SCL and SI lines. Go by the example of timming sequence for a 4-wire SPI in page 47 of the datasheet.
Robert
"No one is completely worthless. They can always serve as a bad example."
Anonymous
Bookmarks