README.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. Simple PWM controller
  2. =====================
  3. `https://bues.ch/cgit/simplepwm.git/ <https://bues.ch/cgit/simplepwm.git/>`_
  4. Simplepwm is a small PWM brightness controller for LED lamps.
  5. Microcontroller
  6. ===============
  7. Simplepwm supports these microcontrollers:
  8. Atmel/Microchip ATTiny 25/45/85:
  9. * Full feature set.
  10. Atmel/Microchip ATTiny 13:
  11. * Reduced feature set.
  12. * No battery power saving.
  13. * No battery voltage monitoring.
  14. Hardware schematics
  15. ===================
  16. See `schematics/simplepwm.pdf <schematics/simplepwm.pdf>`_
  17. Prebuilt firmware images
  18. ========================
  19. The release archives of simplepwm contain prebuilt `.hex` files for all supported microcontrollers in the `hex` directory. These hex files can be flashed directly to the microcontroller with a any tool of your choice (e.g. Atmel Studio or avrdude).
  20. The corresponding fuse settings can be found in the file `fuses.txt` in the same directory.
  21. Building the firmware
  22. =====================
  23. The firmware build needs the following tool chain:
  24. * Unix-like operating system
  25. * GNU make
  26. * AVR GCC
  27. * AVR Binutils
  28. * avrdude
  29. Run the following commands to build the firmware:
  30. .. code:: sh
  31. cd firmware
  32. make DEV=t85
  33. Please specify the target microcontroller using the DEV variable as shown above.
  34. Valid values are:
  35. * ATTiny 13: `DEV=t13`
  36. * ATTiny 25: `DEV=t25`
  37. * ATTiny 45: `DEV=t45`
  38. * ATTiny 85: `DEV=t85`
  39. Flashing the firmware after build
  40. =================================
  41. Run the following commands to flash the firmware to the target microcontroller:
  42. .. code:: sh
  43. cd firmware
  44. make DEV=t85 print_fuses
  45. make DEV=t85 write_fuses
  46. make DEV=t85 write_mem
  47. Or alternatively use any other of the available AVR flashing tools to program the .hex file and fuses.
  48. License
  49. =======
  50. Copyright (c) 2018-2020 Michael Buesch <m@bues.ch>
  51. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
  52. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  53. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.