INterfacing ALFAT SDR 1.2 with ATMEL microcontroller

Hi,

I am trying to interface ATMEL microcontroller with ALFAT SDR1.2. Can you provide any information for the same?

Thanks in advance.

@ jedidiah.vijayson - welcome.

An Atmel processor is not really anything special from an interfacing perspective, so all the standard ALFAT documentation applies. Is there anything you’re interested in to get you started?

Dear Brett,
Do you have example program for interfacing ATMEL microcontroller with ALFAT SDR1.2 (UART)?
I modified the example code given by GHI electronics for ATMEL microcontroller but it is not working for me.

No, I don’t. What Atmel processor are you using? AVR? SAMx?
What problems are you having? What are the actual problems that you’re seeing - what diagnostics have you already tested and what results have you found?

@ Brett -

I am using atmega1281. Can you provide a timing diagram for any command in uart communication. It will be more helpfull for to debug.

I tried to send “J” command from my MCU to Alfat, Please find the attachment.

  uart_transmitByte('J');
uart_transmitByte(0x0A);

But I didnt recieve anything from Alfat. My UART configuration is

Buard rate —>115200
Stop bit —> 1 bit
Parity --> Disabled
Character Size --> 8bit

Atmel UART initilization

UCSR1B = (1<<TXEN1)|(1<<RXEN1);
UCSR1C = (1<<UCSZ10)|(1<<UCSZ11);
UBRR1=3;

Kindly tell me where I am doing mistake.

Without sending any commands you should receive the banner after reset. If you don’t, you didn’t set alfat in uart mode or your micro is not set correctly.

@ Gus -

Thanks for you reply

My connection is as follows

MCU Alfat

UART_TX -------> UART_RX
UART_RX --------> UART_TX
GPIO (input) ---------> BUSY
GPIO (input) ----------> Active

Power
(+5v) -----------> 18 th pin
Gnd ------------------> GND

This is my connection. is it correct? Both the device are connected with same power supply.

You should possibly also have an OUTPUT GPIO on the MCU for the reset line on ALFAT. If, as Gus suggests, you don’t get the banner out when you bring the F40 out of reset, then swap TX and RX. And I’d double check the output on the 3v3 regulator (pin 5 on IC4). And if you were talking about timing diagrams perhaps you have an oscilloscope or logic analyser, separate the F40 from the MCU and bring it up and see if you can read the banner.

@ Brett -
How can I read the banner?

When ALFAT starts up, the banner will be sent from ALFAT tx to your MCU rx. You should have a buffer in MCU to catch them. There are 0x49 bytes if I remember correctly. Nothing else to do, just power the board up, leave SPI_MOSI and SPI_SSEL unconnect to sure that ALFAT is in Uart Mode. If you don’t have anything in your rx buffer, something wrong with your MCU configuration.

If that is the case, try to connect your MCU tx to MCU rx, what you sent is what you get.

As Dat says, you just read the serial line.

Read all the available bytes on the UART.

@ Dat -
Please find the attachment.
I tried to read the banner. I am getting this repeatedly. I didnt connected the MCU. I just powered the Alfat with 5V and Checked the TX pin of Alfat with Oscilloscope during the power on. Is it correct banner?

it totally could be the banner. Nobody here is going to do a serial port analysis of a logic analyser trace for you. Please connect it to something and read the string - even a simple FTDI/similar UART onto a PC USB port will work. It’s just text.

@ Brett -
Please tell me wat text I will recieve as banner?

The manual doesn’t say what text you get - but you should have all the info in the manual. It says:

What text do you get??

@ Brett -
https://www.ghielectronics.com/downloads/man/File_System_User_Manual.pdf

This is the mannual you talking about? It doesnt says anything about banner.
Please what text I will recieve as Banner?

no, this one https://www.ghielectronics.com/downloads/man/F40_Datasheet.pdf

And as I said, the manual doesn’t say. You just need to read the text yourself and then you’ll know.

It should be: “\n GHI Electronics, LLC \n----------------------\n ALFAT SoC Processor \n”