dig:uc2
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | dig:uc2 [2024/02/29 07:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Microcontroller resources ====== | ||
+ | The class uses an [[http:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The Atmel mega chips are 8-bit RISC procesor optimized for small code size that allow up 2KB bootloader to avoid the use of specific programmers. The ATmega328 has 32KB flash, 2KB SRAM, 1KB EEPROM. It can work in a range of CPU clock frequencies, | ||
+ | |||
+ | It is supported by Arduino, so you can simplify your designs using C-Sketch programming style, under the Arduino software tool, that is multiplatform (developed with JAVA). By downloading to its Flash memory a specific bootloader, you can reprogram the code through its UART, that is connected to a FTDI chip to your laptop USB port. | ||
+ | |||
+ | Programming style is completely based on available libraries that reduces development time considerably. Many examples are included in the development tool and there are plenty of available examples on internet. | ||
+ | ===== Tool installation ===== | ||
+ | |||
+ | Development tool can be downloaded directly from [[http:// | ||
+ | |||
+ | For a proper installation and first connection, you can follow these [[http:// | ||
+ | |||
+ | USB interface of Arduino Nano board uses a dedicated USB to UART chip from [[http:// | ||
+ | |||
+ | Note that the Nano boards distributed in 2015 do NOT use an FTDI chip. Instead, the default Windows driver search should be used to find the proper driver. The whole driver installation process is cryptic, so don't hesitate to ask for help. | ||
+ | |||
+ | |||
+ | ===== Starting a new project ===== | ||
+ | Once you open the software development tool a new project is ready or programming. Sketch programming style is based on C-language but it simplifies it to the maximum. | ||
+ | |||
+ | The only mandatory two functions that must have your code are: | ||
+ | * void setup(void) {} : is called once after the reset. | ||
+ | * void loop(void) {} : its content is executed iteratively until the power is switch off or a reset signal is received. | ||
+ | No headers declarations are needed. | ||
+ | |||
+ | You can open available examples from the File menu of the development tool. A good starting point could be Blink example of Basic category. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The button on the left verifies the source code, the next button (with an arrow pointing to right) compiles and download the code to the Arduino through the USB cable. This second button is enough for working. But before pressing that button you must select the proper serial port (check on Windows Device Manager), proper board (Arduino Nano w/ ATmega328) and programmer (AVRISP) from Tools menu. | ||
+ | |||
+ | The remaining three buttons allows you to create a new project, to open an existing one or to save current project. | ||
+ | |||
+ | |||
+ | ===== Make ATmega328P board compatible with Arduino Sketches ===== | ||
+ | |||
+ | If you solder your own Arduino Nano board, you have to know that ATmega328P come with any boot loader when bought separately. Therefore, after you finish the hard work of soldering you Arduino board (specially for Array Resistors), you need to proceed to flash the boot loader. | ||
+ | |||
+ | This boot loader flashing can be done by yourself using your commercial Arduino Nano board as an ISP programmer. [[https:// | ||
+ | |||
+ | ===== Documentation ===== | ||
+ | |||
+ | |||
+ | * {{: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | |||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | |||
+ | * {{: | ||
+ | === For Arduino Nano with CH340 USB serial interface chip === | ||
+ | |||
+ | * [[http:// | ||
+ | * {{: | ||
+ | |||
+ | ===Windows=== | ||
+ | |||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{dig: | ||
+ | |||
+ | |||
+ | ===Linux=== | ||
+ | |||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{dig: | ||
+ | * {{dig: | ||
+ | |||
+ | |
dig/uc2.txt · Last modified: 2024/02/29 07:28 by 127.0.0.1