From: Erich W. <ew....@na...> - 2009-06-02 16:10:41
|
Hello, I spent some time fiddling with spi devices: . MAX186 12 bit ADC . Hope RFM12 I split out a bit-bang version (not that you ever need this on an AVR :-) and a version using the spi interface. Please find attached two examples. Tested with amforth 3.4. Since for every byte there is a response byte, sending several bytes in a row might be a little messy. Also the docs say, that between bytes releasing and requesting "slave select" will synchronize the slave again. It did work without that for me _so_far_ ... but you never know. The bit bang version seems to slow to handle incoming rfm data. At least I did not yet get it to work properly. Matthias, feel free to add the relevant sections to the lib directory of amforth. Cheers, Erich |