Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
dig:lab_3_ardu [2014/03/04 08:21] – [Desired Behavior] al001 | dig:lab_3_ardu [2016/03/11 05:35] – [Documentation] tobi |
---|
{{dig:arduinonanoheaders.png?500|Arduino Nano board headers}} | {{dig:arduinonanoheaders.png?500|Arduino Nano board headers}} |
===== PWM - Pulse Width Modulation ===== | ===== PWM - Pulse Width Modulation ===== |
- Decide on a new PWM output pin for your servo output pulses. Looking at the {{dig:arduinonano30schematic.pdf|Arduino Nano}} schematic and {{:dig:atmega328p.pdf|the ATmega328P datasheet}}, we see that the nano board hard-wires PB5 (D13) to the amber LED Anode, PD0 (D0) to UART RX signal, and PD1(D1) to UART TX signal. These are pins 17, 30 and 31 on the ATmega328P. If you look carefully in the datasheet you will find that not all digital pins of the Arduino Nano headers can be used. Figure out which Timer/Counter is used by Servo library and then select the proper pin. | - Decide on a new PWM output pin for your servo output pulses. Looking at the {{dig:arduinonano30schematic.pdf|Arduino Nano schematic}} and {{:dig:atmega328p.pdf|the ATmega328P datasheet}}, we see that the nano board hard-wires PB5 (D13) to the amber LED Anode, PD0 (D0) to UART RX signal, and PD1(D1) to UART TX signal. These are pins 17, 30 and 31 on the ATmega328P. If you look carefully in the datasheet you will find that not all digital pins of the Arduino Nano headers can be used. Figure out which Timer/Counter is used by Servo library and then select the proper pin. |
| |
{{:dig:atmega328p_portb.png?450|}}{{:dig:atmega328p_portc.png?450| PortC}}{{:dig:atmega328p_portd.png?450|PortD}} | {{:dig:atmega328p_portb.png?450|}}{{:dig:atmega328p_portc.png?450| PortC}}{{:dig:atmega328p_portd.png?450|PortD}} |
===== Documentation ===== | ===== Documentation ===== |
| |
* See [[:dig:uc|uc for AVR32 tool setup and example firmware]] | * See [[:dig:uc|uc2 for ATmega328P tool setup and example firmware]] |
* {{:dig:bronze_v2_pcb_sch.pdf|bronze_v2 schematic}} | * {{:dig:arduinonano30schematic.pdf|Arduino Nano V3.0 schematic}} |
* {{:dig:at32uc3bdatasheet.pdf|AVR32 datasheet}} | * {{:dig:atmega328p.pdf|ATmega328P datasheet}} |
| * {{:dig:mstimer2.zip|Timer2 library}} |
| |
~~DISCUSSION~~ | |
| |