qoistoochee128

[Hangshun Training Camp] 485 communication display instrument-340465A

 
Overview

This is my first time using a 32-bit microcontroller. I hope I can implement a common function while learning and practicing at the same time.

Predictive features:
  • For some models of instruments, Pv value reading and display
  • RS485 interface/ModBusRTU protocol
  • With over-limit alarm (relay/buzzer)
  • Dimming
  • 220V power supply
Non-target functions:
  • Differential ADC test (cancelled)
  • PWM output
Main material pre-selection:
  • Main control: HK32F030MF4P6 with issue price <1 yuan
  • Power supply: Linear transformer
  • Alarm: 9V relay
  • Communication: Maxim’s 485 chip serves as the communication interface
  • Display: TM1650 is used as the display driver, and the 0.52 common cathode digital tube is used as the display (please pay attention to the pin position)
  • Input: Touch the switch as input.
Problems encountered:
  • [ ] I don’t understand USART’s RS485 DE hardware management function, and I don’t know how to configure the pins (I can’t find which pin can be configured as RTS)
  • [x] Almost forgot to leave the debugging interface
  • [ ] I have never used differential ADC and I don’t know how to deal with it.
  • [ ] ------------------21/3/28----------------------------- ----------
  • [x] The current input occupies the programming port and cannot be programmed. This function will not be tested. Solution without welding
  • [x] There is no routine for I2C, and it took three nights to send something out.
  • [x] 485 characters are incomplete during communication. Use a logic analyzer to find that 485 was forced into receiving mode before sending.
Some functional tests:
  • The circuit welding is completed and the power-on temperature is normal.
  • Classic introduction: light up an LED and learn about the use of GPIO firmware library
  • Buzzer: Learned about the use of beep firmware library and learned to initialize peripherals. Using the internal low-speed oscillator buzzer, the measured frequency is 3.565KHz
  • Button reading: use two buttons to control the buzzer switch
  • Digital tube display: Use hardware I2C to successfully light up the digital tube, but the driver chip does not have an address. It feels like it is troublesome to use the firmware library. ----------------2021/3/29------------------------------
  • Serial port transceiver: The routine is running. The most important thing is to delay the transmission, otherwise the 485 will change to the receiving mode before the 485 is sent.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-08-08 21:12:14
  • 【BLE 5.3 wireless MCU CH582】11. Mobile app controls the LED on and off
  • How to learn microcontroller
  • After Labor Day, the EEWORLD community’s April star figures are announced!
  • 【Video Download】C Language Video Tutorial (Zeng Yi)
  • How do you understand this definition?
  • 802.11b

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号