musmanm
Member level 2
- Joined
- May 7, 2015
- Messages
- 50
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 6
- Location
- Seoul
- Activity points
- 558
Hello everyone!
I am very new to coding, especially for an application like this. My system needs data acquisition and processing and simultaneously displaying results on a 16x2 character LCD screen.
I have an RF return loss measurement system. I have to display the return loss on LCD screen on the same PCB board. There are two 12-bit ADCs (ADS7042) and the MCU I have is ATmega128.
ADC1 gives CODE (forward) = CODE_F
ADC2 gives CODE (reflected) = CODE_R
Both CODES have to be processed at the same time.
The equation to calculate return loss values in real time from the two ADCs codes is given as:
This equation has to be processed real-time for every different input, there will be two changed ADC codes and hence a different return loss value for every input.
The both ADCs has to simultaneously transmit digital data to ATmega128 via SPI communication protocol.
I want to code in C and I have just installed AVR Studio 4.
Can someone guide me on how to make a C code for SPI communication in this scenario or is there already some code which I can use for this application?
Thank you in advance.
I am very new to coding, especially for an application like this. My system needs data acquisition and processing and simultaneously displaying results on a 16x2 character LCD screen.
I have an RF return loss measurement system. I have to display the return loss on LCD screen on the same PCB board. There are two 12-bit ADCs (ADS7042) and the MCU I have is ATmega128.
ADC1 gives CODE (forward) = CODE_F
ADC2 gives CODE (reflected) = CODE_R
Both CODES have to be processed at the same time.
The equation to calculate return loss values in real time from the two ADCs codes is given as:
This equation has to be processed real-time for every different input, there will be two changed ADC codes and hence a different return loss value for every input.
The both ADCs has to simultaneously transmit digital data to ATmega128 via SPI communication protocol.
I want to code in C and I have just installed AVR Studio 4.
Can someone guide me on how to make a C code for SPI communication in this scenario or is there already some code which I can use for this application?
Thank you in advance.