Go to file
jakeg00dwin de01c33f8e Updated readme 2024-08-05 17:39:47 -07:00
.template_files patching with HIGH repo setup 2024-08-02 12:57:48 -07:00
build removed uneeded modules 2024-08-02 13:02:22 -07:00
dist/attiny404/debug Updated MPLABX 2024-08-05 16:40:13 -07:00
inc patching with HIGH repo setup 2024-08-02 12:57:48 -07:00
mocks Fixed issue with RegEdit_ReadReg() 2024-08-04 11:40:38 -07:00
nbproject Updated MPLABX 2024-08-05 16:40:13 -07:00
src Tested and working. 2024-08-05 16:40:04 -07:00
tests removed template tests. 2024-08-02 13:10:26 -07:00
.clang-format Adding the formating file from template 2024-08-04 11:25:47 -07:00
.gitignore Added another file to ignore. 2024-08-02 13:10:34 -07:00
CMakeLists.txt patching with HIGH repo setup 2024-08-02 12:57:48 -07:00
Doxyfile patching with HIGH repo setup 2024-08-02 12:57:48 -07:00
Makefile Updated to track the makefile needed for MPLABX 2024-08-02 12:58:37 -07:00
README.md Updated readme 2024-08-05 17:39:47 -07:00
avr-gcc-toolchain.cmake patching with HIGH repo setup 2024-08-02 12:57:48 -07:00
defmplabxtrace.log patching with HIGH repo setup 2024-08-02 12:57:48 -07:00
defmplabxtrace.log.inx patching with HIGH repo setup 2024-08-02 12:57:48 -07:00
otto.sh Patched in formatting function 2024-08-04 11:28:42 -07:00
setup.sh patching with HIGH repo setup 2024-08-02 12:57:48 -07:00

README.md

FG004_A(Relay Tester)

Description

This embedded firmware for testing relay's, it uses an attiny404 to measure the make and break time of a relay.

Micro Controller Pins

ATtiny404

  1. VDD(+5v)
  2. PA4(SW2/BREAK)
  3. PA5(SW1/MAKE)
  4. PA6(NC)
  5. PA7(RELAY_OUT)
  6. PB3(RX)
  7. PB2(TX)
  8. PB1(NC)
  9. PB0(NC)
  10. RST(NC)
  11. PA1(EN)
  12. PA2(NC)
  13. PA3(NC)
  14. VSS(GND)

key NC:: Not Connected PBX:: Port B pin X PAX:: Port A pin X RST:: Reset pin

Project Layout

Tree -L 1, output

.
├── avr-gcc-toolchain.cmake
├── build
├── CMakeLists.txt
├── compile_commands.json -> ./build/compile_commands.json
├── docs
├── Doxyfile
├── inc
├── mocks
├── otto.sh
├── README.md
├── setup.sh
├── src
└── tests

6 directories, 7 files

The source code required to run/build the project is in the /src directory, with the headers residing inside the /inc directory for most public modules.

All other directories are for supporting the development cycle and are used for testitng the code base to ensure accuracy and quality. These are contained in the tests and mocks directories.

Documentation that has been generated is inside the docs folder which contains the html output that can be browswed via your regular web browser.

PDF genreation from the doumentaiton is also possible if enabled through the Doxyfile inside the projects root directory.

The build directory contains the output and makefiles genrerated automatically when using CMake.

This build directory also holds the bin files genreated along with the hex and elf files.

Build Requirements

  • AVR-GCC toolchain OR XC8 from microchip.
  • Make OR CMAKE
  • avrdude
  • A AVR programmer, usbasp for older chips and UPDI for newer ones.

Dev Requirements

  • ATtiny404 series micro-controller
  • AVR-GCC toolchain.
  • Cmake
  • cpputest(Unit testing harness.)
  • Doxygen(For documentation)
  • Git(For version control)

Running Unit Tests

To run the cppunit tests you can use the included shell script inside a bash shell.

echo "1" | ./otto.sh

The command runs the otto script which automates parts of the development cycle such as running and building tests, compiling hex files and flashing the code to a micro-controller using arvdude.

Roadmap

Some stuff that still needs done.

  • Write Unit Tests for Serial Comunications.
  • Write Unit Tests for Timer/Counter (10Khz)