Giter VIP home page Giter VIP logo

espmaslowcontroller-avrfirmware's Introduction

ESPMaslowController-AVRFirmware

The firmware for the ATmega328PB that is included in the ESPMaslowController project.

The ATmega328PB mostly just acts as a GPIO expander. However, since it is fully programmable, there is the possibility for additional behavior in the future.

Command Protocol

Communication is via the SPI port. Each transaction should be 4 bytes long (any additional bytes will be ignored). The SS line is used for synchronization.

The first byte determines the command. The remaining three byte provide parameters which depend on the command.

0x00 = Null Command

This command is ignored.

0x01 thru 0x05 = Motor Setting

Command values of 1 through 5 will command motors 1 through 5. The second byte of the transaction sets the output PWM duty for the motor. The third byte controls the direction of motor rotation. The fourth byte is ignored.

0x06 and 0x07 = AUX PWM control

The PWM6 and PWM7 outputs on the expansion header can be controlled via these commands. The first byte sets the output duty of the PWM. The third and fourth bytes are ignored.

TODO

  1. Have the ATmega328 act as a watchdog to turn off all outputs when no command is received after a certain amount of time.

espmaslowcontroller-avrfirmware's People

Contributors

invncibiltycloak avatar

Watchers

 avatar  avatar

espmaslowcontroller-avrfirmware's Issues

Motor 3 PWM has twice the frequency of the other motors

It is unclear why this is occurring. Motor channel 3 is the only motor attached to Timer 4. The timer is being set up exactly the same as the other motor channels.

It is unclear if Timer 4 is different from the others in some way. The Output Compare Modulator (OCM), which is unique to Timer3/4 only affects OCR3B/OCR4B. However, perhaps there is some other unknown effect of the modulator that is causing the issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.