3263 views|2 replies

12

Posts

0

Resources
The OP
 

【Perf-V Evaluation】Chip Temperature Collection [Copy link]

Today is New Year's Eve. I wish you all a happy Chinese New Year.

Today I plan to evaluate a chip temperature collection project according to the project provided in the manual. I have prepared a 1602 LCD screen with an I2C interface in advance, which looks like this:

There are four pins in total, VCC, GND, SCL, SDA. The biggest advantage of this LCD is that it saves connection pins compared to the parallel port.

There are three types of memory in 1602: CGROM, CGRAM, and DDRAM.
DDRAM (Display Data RAM) is the display data RAM, which is used to store the character codes to be displayed. A total of 80 bytes. If we want to display what we want on the screen, we can directly send the required character codes to the display memory.

The 1602 module has font memory, namely CGROM and CGRAM. The LCD1602 with I2C adapter can display 16x02, i.e. 32 characters, at the same time. The module has two 8-bit registers: instruction register (IR) and data register (DR). Users can select the specified register through the combination of RS and R/W input signals and perform corresponding operations.

RS R/W Instructions
0 0 Write to instruction register (clear screen, etc.)
0 1 Read the busy flag (DB7) and the address counter (DB0~DB6) value
1 0 Write data register (display fonts, etc.)
1 1 Read data from the data register

1. Read status: Input RS=0, RW=1, E=high pulse. Output: D0-D7 is the status word.
 2. Read data: Input RS=1, RW=1, E=high pulse. Output: D0-D7 is data.
 3. Write command: Input RS=0, RW=0, E=high pulse. Output: None. (Set E=high pulse after writing)
 4. Write data: Input RS=1, RW=0, E=high pulse. Output: None

The project code has four modules, I2C module, LCD module, TEMP_DESIGN_INIT and TOP module. The I2C module implements the transmission of address, data and other information in I2C timing. LCD implements the information display on 1602. The TEMP_DESIGN_INIT module is the official module for internal temperature and voltage acquisition.

The connection between LCD1602 and the development board is as follows:

set_property PACKAGE_PIN B11 [get_ports sda]
set_property PACKAGE_PIN B10 [get_ports scl]
set_property PACKAGE_PIN N14 [get_ports clk]
set_property PACKAGE_PIN L13 [get_ports rst_n]
set_property PACKAGE_PIN M15 [get_ports key1]
set_property PACKAGE_PIN L14 [get_ports key2]
From the constraint file, we know that SCL is connected to A0 of the development board, SDA is connected to A1, and the power supply is connected to 5v. In addition, two buttons K1 and SW3 are used to realize the display control of voltage and temperature.

After running the program, the interface displays the temperature curve:

But there is no display on the 1602 LCD, probably the device address is not configured correctly.

There is a loud sound of firecrackers outside, so let’s stop here for the test first.

image.png (36.25 KB, downloads: 0)

image.png

image.png (36.25 KB, downloads: 0)

image.png

image.png (36.25 KB, downloads: 0)

image.png
This post is from EE_FPGA Learning Park

Latest reply

I also encountered the problem of being unable to communicate when using the PL of the mining board to operate the I2C device. You can try to use the I2C corresponding to the MIO of the PS directly.   Details Published on 2021-2-21 13:22

赞赏

1

查看全部赞赏

 

1942

Posts

2

Resources
2
 

The review is well written. I like review posts like yours. Thank you for sharing! Looking forward to the follow-up

This post is from EE_FPGA Learning Park
 
 

9702

Posts

24

Resources
3
 

I also encountered the problem of being unable to communicate when using the PL of the mining board to operate the I2C device. You can try to use the I2C corresponding to the MIO of the PS directly.

This post is from EE_FPGA Learning Park
Personal signature虾扯蛋,蛋扯虾,虾扯蛋扯虾
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list