- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To tell exactly what goes wrong with your approach best would be to post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are saying that you need to send 5 to 6 bytes to the LCD, but are worrying about receiving data. What data do you need to receive from the LCD module?
For sending, the WriteTxData() call does take care of handling the Tx buffer correctly. if you give it 6 bytes, and use the hardware FIFO, it waits until 2 bytes got transmitted and returns then it placed the 6th byte in the FIFO.
If you don't need the data returned from the LCD, just skip reading the Rx FIFO. If you indeed need it, you have two options:
- use an ISR that gets called as soon as a byte is in the Rx FIFO, reads it and plces it to where you need it later on
- use the internal ISR of the SPI component and define a read buffer that large enough to hold the data you need. That way you can complete the transaction, and read the data send by the LCD byte by byte afterwards
(Probably option 2 is simpler, but you need to copy data twice)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content