- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After going through a few application notes and datasheets of the SPI module, I wrote a very basic program to send one bite data through the SPI.
But the oscilloscope does not show any thing on the MOSI pin.
(All default settings of the SPI module)
My program is:
SPI1_Start();
SPI1_SpiUartWriteTxData(82);
Now the binary equivalent of 82 should be sent through the MOSI pin, but that pin does not generate pulses at all.
Where am I going wrong 😞
- 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
My program only contains those two lines of codes mentioned above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure you are looking at the correct pins? Are the pins configured correctly as digital outputs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Post your program!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are no external pins in the SPI component.
My program is:
SPI1_Start();
SPI1_SpiUartWriteTxData(82);
That's all, just two lines apart from the automatically generated codes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without your project nobody can look at your component configuration, or try it at home.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would certainly post the schematic and entire project file, but there's nothing much there.
1. I simply dragged and dropped a SCB module, named it SPI1 and configured it as SPI master.
2. In the C file, I added the following code
SPI1_Start();
SPI1_SpiUartWriteTxData(82);
3. I am not getting any signal on the MOSI pin in the pioneer kit.
(There is no slave connected)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content