Thanh navigation

Hiển thị các bài đăng có nhãn embedded system. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn embedded system. Hiển thị tất cả bài đăng

Thứ Năm, 3 tháng 4, 2025

Watchdog Timer

The Hardware Watchdog

Most chip vendors include an isolated RTL block known as a “Watchdog Timer” in a MCU. This peripheral is comprised of a counter which decrements automatically by the hardware each clock cycle. When the count reaches zero, the hardware will automatically reset the device.

The peripheral is typically disabled by default and it’s the programmers responsibility to configure and enable it in software. Once enabled, the system software needs to reset the counter periodically to prevent the device from rebooting. This operation is usually referred to as “feeding”, “kicking”, or “patting” the dog. The rationale here is if software is unable to reset the watchdog counter, the system is not running as expected and needs to be reset to get back to a sane state.

Rources: https://interrupt.memfault.com/blog/firmware-watchdog-best-practices#the-hardware-watchdog

More resource:

 https://betterembsw.blogspot.com/2014/05/proper-watchdog-timer-use.html

4. https://www.ablic.com/en/semicon/products/automotive/automotive-watchdog-timer/intro/

Thứ Tư, 2 tháng 4, 2025

Chủ Nhật, 6 tháng 11, 2022

Software I2C

The standard I2C library for the Arduino is the Wire library. While this library is sufficient most of the time, there are situations when it cannot be used:

  • the I2C pins A4/A5 (or SDA/SCL) are in use already for other purposes
  • same I2C addresses devices are used

So we write the SoftwareI2C library to use digit port and analog port to enable multiple same I2C addresses devices work on Arduino.

https://wiki.seeedstudio.com/Arduino_Software_I2C_user_guide/

https://github.com/Seeed-Studio/Arduino_Software_I2C

 

https://www.arduino.cc/reference/en/libraries/softwire/

https://github.com/stevemarple/SoftWire


https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/

http://xantorohara.github.io/XantoI2C/

https://www.arduinolibraries.info/libraries/software-wire


Thứ Hai, 24 tháng 10, 2022

1-wire protocol

 https://embedded-lab.com/blog/exploring-stc-8051-microcontrollers-coding/32/

(Không chứa lệnh set resolution thực sự. Đặt bằng phần mềm và sau đó nhân với giá trị thập phân tương ứng. Điều này không đúng) .

 https://www.rfwireless-world.com/Tutorials/1-wire-protocol-basics.html 

https://www.engineersgarage.com/micropython-esp8266-esp32-onewire-ds18b20-ds18s20-ds1922/

Thứ Bảy, 5 tháng 9, 2020

Calibrating DS18B20 1-Wire Sensors with Ice & Steam point measurement



A good article from The Cave Pearl Project.

 

https://thecavepearlproject.org/2015/03/30/using-ds18b20-one-wire-sensors-to-make-a-diy-thermistor-string-pt-2-calibration/

Thứ Bảy, 20 tháng 12, 2014

PL2303 USB to TTL cable

Cáp chuyển đổi tín hiệu từ cổng USB sang TTL sử dụng chip PL2303. Cáp này hay được dùng để kết nối máy tính cá nhân (PC) với các thiết bị, module có hỗ trợ giao tiếp UART. Nó rất hữu ích khi kết nối PC với vi điều khiển.



Đối với Windows 7, driver của cable có thể download tại đây

Nếu bạn đang dùng Windows 8/10, hãy tải bản CŨ của cable tại đây