A: 0x80 is a hexadecimal which is equal to 128
Terms for Serial IO:
- bit-banging: using software instead of hardware
- PISO: parallel in, serial out =/= SIPO: serial in parallel out
- asynchronous: independent clock, 2 ways communication, does not need to get response before sending
- synchronous: dependent on clock. Contrast to asyn
- MSB: most significant bit
- LSB: less significant bit
- USART: Universal synchronous/asynchronous receiver transmitter
- linefeed: moving one line forward \n
- carriage return: moving the cursor to the beginning of line \r
- https://learn.sparkfun.com/tutorials/serial-communication
- https://hekilledmywire.wordpress.com/2011/02/23/direct-port-manipulation-using-the-digital-ports-tutorial-part-3/
- http://www.avr-tutorials.com/digital/about-avr-8-bit-microcontrollers-digital-io-ports
- https://embedjournal.com/interface-4x4-matrix-keypad-with-microcontroller/
- http://what-when-how.com/8051-microcontroller/keyboard-interfacing/
- https://hekilledmywire.wordpress.com/2011/02/23/direct-port-manipulation-using-the-digital-ports-tutorial-part-3/
- Timer in AVR: http://maxembedded.com/2011/06/avr-timers-timer0/
- read 110, and 107
- https://sites.google.com/site/qeewiki/books/avr-guide/pwm-on-the-atmega328
- this site talks about duty cycles
- - http://maxembedded.com/2011/08/avr-timers-pwm-mode-part-i/
- http://maxembedded.com/2011/08/avr-timers-pwm-mode-part-ii/
- http://www.electroschematics.com/9846/avr-8-16-bit-timers-counters/
PRESCALER
a motor get hot when PWM is too fast
prescale setting how fast the timer count (default is 1 matching with the rate of the clk)
T0: PIN D4
T1: D5
PWM has 3 modes:
1. Fast PWM mode:
- work as normal counter
- Signal -> control logic -> TCNTn (Timer counter register) ++ -> match? -> OCFnx
PIC, 8085 , AVR, 32 Bit ARM7
TM4C1294NCPDT
FPGA
#include <avr/io.h>
a motor get hot when PWM is too fast
prescale setting how fast the timer count (default is 1 matching with the rate of the clk)
T0: PIN D4
T1: D5
PWM has 3 modes:
1. Fast PWM mode:
- work as normal counter
- Signal -> control logic -> TCNTn (Timer counter register) ++ -> match? -> OCFnx
PIC, 8085 , AVR, 32 Bit ARM7
TM4C1294NCPDT
FPGA
#include <avr/io.h>
int main(void){
//initialize the port for the LEDs
DDRB
PORTB
TCCR1B |= 1<<CS10
while(1){
if (T
}
}
timer: http://maxembedded.com/2011/06/introduction-to-avr-timers/
timer: http://maxembedded.com/2011/06/introduction-to-avr-timers/