Forum Discussion
Please share your suggestions and ideas to get the above things done.
- FvM2 years ago
Super Contributor
Hi,
you are referring to a specific dev board? Does it come with example code for MAX6581 access?- Manik2 years ago
New Contributor
Hi @FvM,
Thanks for your interest in helping me.Yes, I am referring to the board Stratix 10 Dx FPGA Development Board (https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=248&No=1258).
No, the development board didn't come with any specific reference design to access MAX6581.For you kind reference here with I have given the link for the FPGA Development Board manual,
https://www.intel.com/content/www/us/en/docs/programmable/683561/current/supported-features.html
Board Schematic
MAX6581 Datasheet
https://www.analog.com/media/en/technical-documentation/data-sheets/MAX6581.pdf
Based on the information available over the manuals and documents, I attempted to create a system to access the temperature through Stratix 10 Dx FPGA with NIOS II and I2C(https://www.intel.com/content/www/us/en/docs/programmable/683130/22-1/fpga-i2c-host-core.html) and tried to read the temperature value through I2C functions in C, In that only I have the following queries.
1. How to read the temperature values from max6581?
2. Address for reading the registers of max6581 from nios II through I2C IPcore? (Is it 0x4D or 0X9A?)
3. How to convert the temperature hex value to real temperature value in Celsius or Fahrenheit?
4. are the registers addresses given in the max6581 datasheet should be considered as offset?
5. Is there any reference design to read temperature values from intel of similar kind ?
Kindy help me to get the temperature read through the FPGA.
I appreciate your efforts.Thank you
- FvM2 years ago
Super Contributor
Hi,
o.k., no example shipped with the dev board, unfortunately.
Personally, I'm accessing temperature monitors and fan controllers in HDL rather than NIOS, but embedded I2C host IP should work as well.
Regarding address notation, originally I2C device addresses use 7-bit notation (0x4D, left aligned in first I2C byte. Maxim seems to prefer 8-bit notation (0x9A, right aligned). In host IP, you write 0x4D to TFR_CMD.AD (bit 7:1).
As with many I2C devices, register address is written as single byte to MAX6581, then the register content is read. Typical I2C sequence is shown in datasheet.