User Tools

Site Tools


dig:lab_3_ardu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
dig:lab_3_ardu [2014/03/04 08:23] – [Documentation] al001dig:lab_3_ardu [2014/03/04 08:23] – [PWM - Pulse Width Modulation] al001
Line 36: Line 36:
 {{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}}
dig/lab_3_ardu.txt · Last modified: 2024/02/29 07:28 by 127.0.0.1