View previous topic :: View next topic |
Author |
Message |
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sat Aug 23, 2014 6:54 am |
|
|
I downloaded the applications manual and it's not really an SPI device. If you use Google you'll find a 'driver' for another micro , in C, that you could adapt for CCS C.
You'll need to read/write 52 bits of data though.
Epson is famous for this..I think it's based on nibbles rather then bytes.
hth
jay |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Sat Aug 23, 2014 7:06 am |
|
|
So its a SERIAL-INTERFACE device not the Motorola SPI.
So the driver would be a software one. no hardware module in pic to perform
comm.
Thanks temtronic. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sat Aug 23, 2014 9:56 am |
|
|
YES ..NOT SPI, you have to create your own software driver...
jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Sun Aug 24, 2014 1:04 am |
|
|
As a quick comment, the standard #use rs232 driver may be able to do this!.
I don't know if the software serial driver supports software sync. You'd have to write a quick test to see. However if it does, you'd need to generate two streams, one for TX, and one for RX. So:
Code: |
#use rs232(BAUD=xxx,XMIT=B0,RCV=B1,SYNC_MASTER,STREAM=TX)
#use rs232(BAUD=xxx,XMIT=B0,RCV=B1,SYNC_MASTER_CONT,STREAM=RX)
|
I don't see where it specifies a baud rate?.
Then you'd have to operate the WR pin to the right direction, and send or receive on the corresponding stream.
If the software doesn't support it, you'd need a PIC that supports a USART, rather than a UART.
The data sheet lacks important things like what the byte format is, serial clock rate, bit order etc. etc.. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Sun Aug 24, 2014 3:55 am |
|
|
Pull this manual, instead of the one you have:
<http://www.epsondevice.com/docs/qd/en/DownloadServlet?id=ID000500>
The supported baud rate is 128Hz, to 1.3MHz. Pretty much anything you want.
The format, could be generated by the hardware EUSART, as already mentioned. Being LSb first, it is not compatible with hardware SPI. It is basically synchronous serial, sending 6.5 bytes at a time. The hardware would have to do 7 bytes, but they are careful to tell you that extra clocks after the 52nd one are ignored, so 8bit hardware could be used.
It could also be generated by the software SPI routines, again using two streams, one for transmit, and one for receive. |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Mon Aug 25, 2014 12:34 am |
|
|
Thanks Ttelmah. |
|
|
|