How can I make a 16bit SPI master with st7lite19b for max3100 communicaiton
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-10-29 9:33 PM
Posted on October 30, 2006 at 06:33
How can I make a 16bit SPI master with st7lite19b for max3100 communicaiton
Labels:
- Labels:
-
Legacy Products
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-10-29 1:39 PM
Posted on October 29, 2006 at 22:39
Hello,
ST7LITE19B can be used for 8bit SPI master or slave. I'm trying to connect the MAX3100(SPI-UART) with ST7LITE19B. ST7 is the master, and max3100 is the slave. Max3100 requires 16bit data stream, but I cannot make a 16bit data stream. Basically, ST7 provides 8bit data stream. Does anybody has a code for SPI-UART communicaito? Or let me hear some advice. [ This message was edited by: btjung on 30-10-2006 03:10 ]Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2006-10-29 9:33 PM
Posted on October 30, 2006 at 06:33
Hi,
as the SPI uses asynchronous data transmission, there should be no problem, when you split the 16bit-word into two 8bit-words. Hold the \CS-pin of the MAX3100 down until the second byte has been transmitted. In the same way you will receive two 8bit-words and must reassemble them to your 16bit-word. - First pull down the \CS-pin of the MAX3100. - Start the 1st 8bit-transmission by writing the 1st byte to the SPIDR. - When this transmission has been completed, the flag SPICSR.SPIF will occur. - Fetch the received 1st byte. - Start the 2nd transmission by writing the 2nd byte to the SPIDR. - With the next SPICSR.SPIF you fetch the received 2nd byte. - Pull high the \CS-pin of the MAX3100. - Ready. Regards WoRo