- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this is the programme that i use to interface SPI with shift register . i use Apex 20k200e .
# include "excalibur.h" int main ( ) { int i; int data_1 = 0x79; for (i = 0; i < 100 ; ++i) { // Transmit a byte: while (!(na_spi->np_spistatus & np_spistatus_trdy_mask)); na_spi->np_spitxdata = data_1; // Read and throw away the received data: while (!(na_spi->np_spistatus & np_spistatus_rrdy_mask)); na_spi->np_spirxdata; } //nr_delay(1000); // Wait until the last byte is transmitted: while (!(na_spi->np_spistatus & np_spistatus_tmt_mask)); // Release SS_n: na_spi-> np_spicontrol &=~np_spicontrol_sso_mask; } but the problem is my shift register still no output. can anyone recomment me any comment about programme.Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page