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 revision
Previous revision
Next revisionBoth sides next revision
dig:lab_3_ardu [2014/03/04 08:21] – [Desired Behavior] 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}}
Line 198: Line 198:
 ===== 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~~ ~~DISCUSSION~~
  
dig/lab_3_ardu.txt · Last modified: 2024/02/29 07:28 by 127.0.0.1