Project - Simple ALFAT SPI Driver

I just posted Simple ALFAT SPI Driver on Codeshare. Feel free to discuss and make suggestions here.


@ Dat - The page says it is outdated and to see the documentation. Where is the documentation?

@ rockybooth - The latest information on ALFAT (now F40) can be found on

I am trying to interface atmega644 with alfat f40 usb 1.4
what would be the hardware connections? I understand that miso,mosi,sck and ssel connected to atmega miso,mosi,sck and ss pins but what about busy and data ready pins?

Busy pin tells host whenever ALFAT is busy or can not accept more data. Host should wait until this pin is clear to send next data.

DataReady pin tells host whenever ALFAT has something ready for host to read.

Can you tell me what are spi active and busy pins (i mean pin numbers?). As far as i have understood, pin number 2 is busy pin and pin 10 is active? Am i right?

i am using the following datasheet

you’re not quite right. These are general purpose pins, the active and busy pin, they are not SPI pins. Pin 2 is the BUSY pin when the device is used in SPI or I2C mode (not in UART mode). Pin 10 is the ACTIVE pin.

But please just concentrate on your own thread, you’re diluting answers by asking in two places. Just keep it all in the one spot…

PA10 is BUSY pin for SPI, I2C

PA6 is BUSY pin for UART

PA4 is active pin for all SPI, UART, I2C

and just to be clear, Dat is talking about the CHIP PIN numbering. You need to look at the pinout on your schematic to confirm the header layout. (which is what my description is based from)

Sorry i didnt understand
Plz tell me the active and busy pins on the header layout (i-e 1~18)?

From User Interface header

PA10 = pin2

PA6 = pin 6

PA4 = pin 10.