AVR-PWM-RTU

所属分类:单片机开发
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2024-01-01 19:42:02
上 传 者sh-1993
说明:  基于Atmel ATMega 328的Modbus和按钮控制4通道PWM发生器
(A Modbus and push-button controlled 4-channel PWM generator based on the Atmel ATMega 328)

文件列表:
AVR-PWM-RTU/
AVR/
LICENSE
Registers.ods
Registers.png
Schematic.png
Simulide.png
fan_controller.sim1
modbus_test.py

- Description - Register map - Schematic - Simulation - Goals - Wetware at work ### Description A Modbus and push-button controlled 4-channel PWM generator based on the Atmel ATMega 328. Each channel can be set to one of four pre-defined duty cycles (0-255). In addition to being controllable by Modbus commands, the channel levels (0-3) can also be selected by means of individual push-buttons, wich increment a channel's level, wrapping at 3. The active level for each channel is output as a 2-bit value which is used to drive a set of four LEDs by means of a 74HC138 decoder. The idea is to allow for remote control of the individual channels over a three-wire interface (plus GND and VCC). The Modbus communication layer is provided by the yaMBSiavr library. The code compiles to less than 8kb. *N.b. this is very much work in progress and many planned features are yet to be implemented - see goals.* ### Register map Putting a 1 into the last register (currently 50) will trigger a write to EEPROM of all register values. ![Registers](https://raw.githubusercontent.com/clickworkorange/Atmel-PWM-RTU/main/Registers.png) ### Schematic A KiCAD schematic can be found in the /AVR-PWM-RTU folder. ![Schematic](https://raw.githubusercontent.com/clickworkorange/Atmel-PWM-RTU/main/Schematic.png) ### Simulation Included is a Simulide project which runs the Atmel C code and simulates the control panels: ![Simulide](https://raw.githubusercontent.com/clickworkorange/Atmel-PWM-RTU/main/Simulide.png) ### Goals * Design a PCB from the KiCAD schematic * Enforce limits on register values and validate input parameters * Make slave address & comms parameters settable through Modbus registers * Incorporate a reset button to return the EEPROM to factory defaults * Make PWM phase and frequency (or scaler) settable through Modbus registers ### Wetware at work Resistance may indeed be futile, and I for one welcome our new software based overlords - who I'm sure are paying close attention. But this software was written by a *human*, and only humans can enjoy writing code. Perhaps that joy by itself will one day be seen as an act of resistance? Wetware at work

近期下载者

相关文件


收藏者