Previous in Forum: energy conservation   Next in Forum: Modem to modem woes...
Close
Close
Close
Rate Comments: Nested
Anonymous Poster

microcontroller progarmming

02/21/2008 2:50 PM

can any body help as c code for the 5bytes of data reception through spi interface, this is all for the atmega32 microcontroller.

Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Associate

Join Date: Oct 2007
Posts: 48
#1

Re: microcontroller progarmming

02/22/2008 8:57 AM

Hi !

Answer 2 ur question:

Just assert the chip select line (S/S/ pin to 'LOW' in you case) of the slave device untill all 5 bytes get transeffered from master (atmega32) to slave device.

ok in brief:

1) first assert SS pin low of Atmega32.

2) send 1st byte and wait for x'mit compelete signal

3) send 2nd byte and wait for x'mit compelete signal

4)send 3rd byte and wait for x'mit compelete signal

5)send 4th byte and wait for x'mit compelete signal.

6) send 5th byte and wait for x'mit compelete signal

After x'fer comletion, make ss pin high.

That all u have to do.

Good luck buddy!

Reply
Reply to Forum Thread

Previous in Forum: energy conservation   Next in Forum: Modem to modem woes...
You might be interested in: Bar Code Scanners, Bar Code Cards, Bar Code Software

Advertisement