| View previous topic :: View next topic |
| Author |
Message |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Wed Jun 02, 2010 8:51 pm |
|
|
Thanks Ben.
I understood what you said.
It seems that you can not control lcd graphic with the PIC18F4550, according to the microchip, just starting the PIC24.
I'll research it is possible and try to write a "hello world".
Complicated the situation, without much basis ... |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Wed Jun 02, 2010 10:08 pm |
|
|
| lucasromeiro wrote: | Thanks Ben.
I understood what you said.
It seems that you can not control lcd graphic with the PIC18F4550, according to the microchip, just starting the PIC24.
I'll research it is possible and try to write a "hello world".
Complicated the situation, without much basis ... |
Not with Microchip's drivers.... No.
Without looking, I'm guessing the 18F4550 probably has an SPI/MSSP module (and maybe a PMP and definitely enough GPIO to make up an 8bit port with control).
If you wrote your own low level device driver -- you could do it.
I get the feeling you just want something pre-packaged and ready to go. And I think until someone writes drivers specifically for your LCD for a PIC you are using with the same Compiler, you'll be without. _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Thu Jun 03, 2010 11:04 am |
|
|
Ben
I understood what he said about using the 18F4550 pic. I agree .... understand!
but for me to make the driver for it on low level (asm?) do not know, never done anything like that.
Another doubt very important. Where I think this library that draws circles and buttons for me? this is very interesting, would be a great starting point.
Your tips are helping a lot .. never knew there was something ready to make buttons ...
I wanted to learn to do that, but as you said, it is difficult for me cuz I never did anything of the genre and do not have much support or source to find data that will help me.
However the most annoying is that I do not have to simulate the lcd, the Proteus does not have it ... any suggestions?
Thanks |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Thu Jun 03, 2010 11:17 am |
|
|
| lucasromeiro wrote: | Ben
I understood what he said about using the 18F4550 pic. I agree .... understand!
but for me to make the driver for it on low level (asm?) do not know, never done anything like that.
|
ASM? Nah, the timing isn't that critical. You should be writing this stuff in C first. You do know how to write in C, yes? If so, this should all be a matter of a lot of cut and paste for writing the code to bang out the data to the LCD.
| Quote: |
Another doubt very important. Where I think this library that draws circles and buttons for me? this is very interesting, would be a great starting point.
Your tips are helping a lot .. never knew there was something ready to make buttons ...
I wanted to learn to do that, but as you said, it is difficult for me cuz I never did anything of the genre and do not have much support or source to find data that will help me.
|
I don't know what you mean here. The source is there. You have to study it. It sounds more and more like you don't know anything about writing in C. If so, your first task will be some smaller projects to get used to the language.
| Quote: |
However the most annoying is that I do not have to simulate the lcd, the Proteus does not have it ... any suggestions?
|
I don't really ever simulate anything. I write the code. Build a prototype and then roll up my sleeves and test it out...
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Thu Jun 03, 2010 11:37 am |
|
|
I understand what I say, thanks for the tips, I am searching looking for something more to help me, any book or tutorial. some stuff ..
Good to know that is not in ASM.
Thanks for any help. was a great help!
Thanks |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Thu Jun 03, 2010 12:24 pm |
|
|
Get "The C Programming Language" - ISBN 0-13-110362-8 for starters as well as some of the other fun PIC related books listed on the CCS website here:
http://www.ccsinfo.com/content.php?page=books
(the first book I mentioned is also listed at that link. It talks about the 'C' language, not about PIC micro's. You'll also want a book that talks about PIC microcontrollers ) _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Thu Jun 03, 2010 1:06 pm |
|
|
Ok .. I've had some classes on C, ongoing engineering mecatronica .... but I must need some deeper knowledge to do this ....
I thought it would be in ASM ...
I'm still a little confused ..
Do you ever shake with graphic LCD? |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Thu Jun 03, 2010 1:16 pm |
|
|
I wrote some test code for a graphical OLED based on the SSD1339 controller.
This was the display: http://www.sparkfun.com/commerce/product_info.php?products_id=712
It's RGB, it can use either SPI or parallel (I used SPI).
I just make a quick test program to see it working in bright/direct light.
Took about 1hr. It's a nice display.
I have a use in mind for it, I just need to get a board laid out to test a couple of other LCD's I want to evaluate for this project.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Thu Jun 03, 2010 1:27 pm |
|
|
Interesting. SPI serial communication would be? or communication as those of 16x2 lcds that use four wires?
I already fuse with this type of LCD, 16x2, send it via the p command printf. That library with normal SCC.
Would the same principle?
Now I'm getting assimilate well what I speak.!
Good!
Your program could be used to write on my lcd right? if I'm correct, it's like I'm thinking .. at least by parts ...
I was curious when you said that the SCC / Microchip has a library that has buttons ready ... I explain that I was interested!
= D |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Thu Jun 03, 2010 2:50 pm |
|
|
| lucasromeiro wrote: | Interesting. SPI serial communication would be? or communication as those of 16x2 lcds that use four wires?
I already fuse with this type of LCD, 16x2, send it via the p command printf. That library with normal SCC.
Would the same principle?
|
SCC? You mean CCS?
And the answer is "maybe" -- I normally write my own drivers. I haven't used the CCS "universal LCD driver" yet.
If you want to know what SPI is vs. Asynchronous, you should feed your brain via google search.
| Quote: |
Your program could be used to write on my lcd right? if I'm correct, it's like I'm thinking .. at least by parts ...
|
Probably not since SSD2119 != SSD1339.
There would be some differences.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Thu Jun 03, 2010 3:22 pm |
|
|
Ben, I understood what I said.
I'll Find on SPI asynchronous.
Here is my starting point.
Can you tell me the difference SPI asynchronous and parallel transmission?
Thanks |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Thu Jun 03, 2010 3:57 pm |
|
|
| lucasromeiro wrote: | Ben, I understood what I said.
I'll Find on SPI asynchronous.
Here is my starting point.
Can you tell me the difference SPI asynchronous and parallel transmission?
|
No no, SPI is a synchronous type of transmission.
Something like using a UART (like to the serial port on your computer) is *commonly* asynchronous (but not always!).
Both are forms of serial transmission.
Parallel transmission involves sending MORE than 1 data bit at a time (like an old printer that uses the parallel port). Parallel transmission typically requires MORE pins of a device to handle a transaction.
SPI: SDO, SDI, SCK and a ChipSelect line. That's 4.
8bit parallel: Data0-7 (8), Strobe/Latch (1) -- that's 9 total. Some parallel interfaces have even more. Look up the parallel port on your PC to see how many are used there and you'll see why the connector is 25 pins.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Thu Jun 03, 2010 4:10 pm |
|
|
Hello Ben,
Understand very well what I said.
Already researched and read a little about it.
Should I have a pin that is the TX and RX is the one that, right /? and the other two wires for serial?
I know that is tx and rx for transmission to reception, in the examples that I found only use these two pins ..
Exactly .. then the SPI transmission is better than the parallel, correct?
I found it very interesting that statement!
Already worked with the parallel port, DB25 ... should be much more difficult to control in parallel mode ...
You said you have to use some buttons ready, as I find it? |
|
 |
bkamen
Joined: 07 Jan 2004 Posts: 1619 Location: Central Illinois, USA
|
|
Posted: Thu Jun 03, 2010 7:40 pm |
|
|
| lucasromeiro wrote: |
Already researched and read a little about it.
Should I have a pin that is the TX and RX is the one that, right /? and the other two wires for serial?
I know that is tx and rx for transmission to reception, in the examples that I found only use these two pins ..
|
It's common in RS232 land (UART based serial -- typically 10bits asynchronous) to have a Transmit and Receive line called TX and RX.
There's really no reason you couldn't call SPI data lines the same things. But the designers decided for something a little more informative.
See: http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus
| Quote: |
Exactly .. then the SPI transmission is better than the parallel, correct?
I found it very interesting that statement!
Already worked with the parallel port, DB25 ... should be much more difficult to control in parallel mode ...
You said you have to use some buttons ready, as I find it? |
SPI in simpler which might be better. It might not.
Remember with Parallel, each transfer can move more bits than a single SPI clock (1 bit). But as the length of a bus gets longer and faster, it's harder to line up 8 bits of parallel data than it is to line up a single serial line and a clock.
It's one of the reasons ATA drives in your computer went from Parallel (PATA) to Serial (SATA),
SATA saves board space (no longer need an 40pin cable or the 80pin connector with High density cable/connectors).
Last I remember, PATA went up to about 133MB/s and then the switch to SATA started to occur.. Speed and board layout complexity became issues with all those parallel lines for PATA. SATA is now better.
Check out these pages:
http://en.wikipedia.org/wiki/Serial_ATA
http://en.wikipedia.org/wiki/Parallel_ATA
But this is a bit beyond SPI and Parallel as implemented on the PIC's. (PMP, PSP)
SPI on a PIC has speed limitations depending on the PIC. As an example, the PIC24F's typically max out with a speed of 8Mb/s.
The PMP, running in 16bit mode, looks like it has a min transfer time of 8Tcy (which for the 24F looks to be a min Tcy of 1/16MHz or 62.5nS which ultimately == 2 Million Transfers per second.) Now if you multiply this x16 bits per transfer, this is an effective transfer rate of 32Mb/s or about 4 times faster than SPI.
So you can see, parallel can be advantageous... but if the device hooked to the PMP is slow and forces the insertion of wait states or delays, that big performance advantage can be lost.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
 |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
|
Posted: Fri Jun 04, 2010 7:55 am |
|
|
Hello Ben.
I looked at what happened and I understand perfectly.
Now it's clear the issue of parallel and serial ..
In my case, the LCD will require a bit rate higher than SPI?
As you said, depends on the equipment you need to use parallel. in my case I can do everything only with RLS without restrictions?
In this case the LCD SPI limit anything?
As I understand the SPI is much easier to be controlled that the parallel, and is also much more reliable.
I liked the explanation! Became much clearer!
You said you have to use some ready-made buttons, how can I find them and use them?
Thanks |
|
 |
|