Lab 1: Microcontroller programming setup
In this first exercise let's install the necessary tools and run an example program on a pre-assembled microcontroller board.
By the end of this exercise we should be able to compile the example project Blink, program Arduino Nano board with it, then include by yourself Serial interface for helping monitoring for debugging purpose.
Questions
By next class, individually attempt at answers to the following questions, which you may be able to answer by reading the ATmega328P Datasheet, Sparkfun Arduino Programming guide and Arduino Reference language. The datasheet contains usage information, while the both Sparkfun and Arduino programming references have more information about programming in Sketch.
The questions are below. The link to the google form for you to answer these questions will be sent to by email.
- How much flash/SRAM/EEPROM memory does the ATmega328P have?
- Is there one instruction executed per clock cycle or does it require multiple clock cycles per instruction?
- What is the maximum system clock frequency, does clock frequency have any dependence?
- What is the maximum power consumption of ATmega328P? Which two main parameters are in this matter?
- What is the oscillator start-up time from sleep?
- What is the “initialisation time” for the ADC?
- What is the ADC power consumption?
- What is the maximum PWM output frequency using 8-bit timer/counter (analogWrite function)? And using 16-bit timer/counter (Servo library)?
- What is the value of the pull-up resistor on the GPIO (when enabled)?
- Does the ATmega family have floating point hardware support?
- Does the ATmega328P have a hardware multiplier? If so, how many clock cycles does it take and what is its resolution, i.e, how does it handle overflows?
- And does the Atmega have DSP (Digital Signal Processing) instructions for multiplying, accumulating, and incrementing a pointer in one instruction?
- What is a Sketch? Do you know the difference between C/C++ programming and Arduino Sketches?
- How can you debug your code under Arduino?