• AVR Freaks

Help for Auto Calibration of MCP39F511A

srikanth medisetty
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2017/08/28 05:44:11
  • Location: 0
  • Status: offline
2020/05/25 23:25:31 (permalink)

Help for Auto Calibration of MCP39F511A

I have a custom board with the MCP39F511A interfacing imx6ul processor board over UART.I have gone through the datasheet and found out the registers to be written and the packets information.But I didn't clearly understand the process of Range setting to get the desired output.I have a found a sample code from microchip forum which was for Arduino and I have converted the same packets into my uart packets.I tested my code and I am able to get the Gain,voltage and other calibrated values.But still I was not able to get the understanding of the output I am receiving.I will attach the sample code I got from the forum for reference.
After running the sample code on my custom board below are my observations:
1. ACK for set Range packet but didn't understand the range values what they are writing.
2.ACK for set PGA packet.
3.NACK for set target registers packet.
4.NACK for frequency calibration.
5.NACK for Gain calibration.
6.ACK for Relative gain cal and the output is
   RxBuffer[1] for Relative Gain cal = 0x09
   RxBuffer[2] for Relative Gain cal = 0xac
   RxBuffer[3] for Relative Gain cal = 0x80
   RxBuffer[4] for Relative Gain cal = 0xff
   RxBuffer[5] for Relative Gain cal = 0x00
   RxBuffer[6] for Relative Gain cal = 0x00
   RxBuffer[7] for Relative Gain cal = 0x00
   RxBuffer[8] for Relative Gain cal = 0x3a
   Gain Current Rms=32940
   Gain Voltage Rms=255
   Gain Active power=0
7.Ack for Read Range and the ouput is
   RxBuffer[1] for Read Range = 0x07
   RxBuffer[2] for Read Range = 0x12
   RxBuffer[3] for Read Range = 0x0a
   RxBuffer[4] for Read Range = 0x11
   RxBuffer[5] for Read Range = 0x00
   RxBuffer[6] for Read Range = 0x3a
8.ACK for read system configuration and the output is
   RxBuffer[1] for read system configuration = 0x09
   RxBuffer[2] for read system configuration = 0x00
   RxBuffer[3] for read system configuration = 0x00
   RxBuffer[4] for read system configuration = 0x00
   RxBuffer[5] for read system configuration = 0x01
   RxBuffer[6] for read system configuration = 0x00
   RxBuffer[7] for read system configuration = 0xec
   RxBuffer[8] for read system configuration = 0xfc
   From the above outputs I want to understand the meaning of the replies and are they correctly returning the outputs.


0 Replies Related Threads

    Jump to:
    © 2021 APG vNext Commercial Version 4.5