Description
The processor core of the NANO ch340 is ATMEGA328P-AU. Compared with official ARDUINO NANO, NANO ch340 adopts the USB-to-serial CH340G chip. Except its driver file, methods of use are exactly the same.
It also comes with 14 digital input/output channels (six of which can be used as PWM output), 8 analog inputs, a 16MHz crystal oscillator, a Type-c USB port, an ICSP interface and a reset button.
Among them, ICSP is used to burn firmware for ATMEGA328P-AU. Since we have burned the firmware of this chip before it go out, this port is generally not used. When in use, we power the board through Type-c USB cable
or Vin GND(DC 7-12V).
Parameters
- MCU: ATMEAG328P
- Operating voltage: 5v
- Input voltage (Recommended) : DC 7-12v
- Digital I/O Pin: 14 (DO-D13)
- PWM digital I/0 pin: 6 (D3 D5 D6 D9 D10 D11)
- Analog input pin: 8 (A0-A7)
- Dc current per I/0 pin: 40 mA
- Flash memory: 32kb, 2kb of which is used by bootloadere
- SRAM: 2KB
- KBEEPROM: 1KB
- Clock speed: 16 MHz
- LED_BUILTIN:D13
- Operating temperature: 0℃-50℃
- Development board size: 18MM×45MM×18MM
- Development board weight: 6.0G
- Operating temperature: 0℃~50℃
Pin-out
Special Interfaces
Serial communication port: RX0, TX1
PWM interface (pulse width modulation) : D3 D5 D6 D9 D10 D11
External interrupt interfaces: D2(interrupt 0) and D3 (interrupt)
SPI communication interface: D10 is SS, D11 is MOSI, D12 is MISO, and D13 is SCK
IIC communication ports: A4 for SDA, A5 for SCL
Product Guide
Download Arduino IDE(WIN10/MAC)
First of all, we need to download and install the Arduino IDE.
You can download Arduino IDE at:
https://www.arduino.cc/en/software/
Choose the version compatible with your computer system.
Download thelatestIDE version 2.3.4.
Click "JUST DOWNLOAD" to download
After it has downloaded, install the software
Remember the installation path to make sure you can find the file next time. Click Install.
The Arduino IDE is downloaded and installed here.
Download USB Driver
Next, download the CH340 driver. Driver download:
https://www.wch.cn/downloads/category/67.html
First, choose the same chip model as your board.
Then, download the driver according to your computer system.
Download Windows Driver
And click Install.
Then check to see if the driver installation is successful. After connecting the control board to your computer by a USB cable, open the Device Manager.
Open device manager.
If you see a yellow mark, try re-installing or changing another interface.
Download Mac Driver
Download the software suitable for MAC and then find it in the download bar.
After opening the installation package, we get these three files. Put the three files in one folder please! Then click the file suffix PKG to install it.
Install it. Still remember the installation path!
Burn code on Arduino IDE
Click the Arduino IDE logo:
and connect it to the development board and COM port.
Be sure to select the correct development board, otherwise it fails to connect!
Enter the name of the board, select the corresponding board model, select the port, and click OK.
Then create a Script. You can press Ctrl+N or click "New Script" in the top left icon. You will see the following interface:
Burn codes.
Copy and paste the following code inside. Please delete its own content.
//set baud rate
pinMode (ledpin,OUTPUT); // int val; //set variable
int ledpin=13; //set led pin to 13
voidsetup (){
Serial.begin (9600); set pin mode
}
voidloop ()
{
val=Serial.read (); //assign serial values
if (val=='R')//determine the serial value
{
digitalWrite (ledpin,HIGH); // light on
delay (500); //delay 500 ms
digitalWrite (ledpin,LOW); // light out
delay (500); //delay 500 ms
Serial.println ("Hello World!"); //serial outputs Hello World!
}
}
Let's compile and burn codes on it. First click the check. Prompts shows compiling results. If no error is reported in it, you can click the arrow.
Look at the code functionality.
Ctrl+Shift+M or open the Serial Monitor to check that the code baud rate is consistent with the software baud rate.
Type a letter R into it and press Enter to display "Hello World".
At the same time, the onboard LED will also flash. Congratulations on your successful journey as a programmer!
Fails to Burn Code
- Check whether the development board and port are selected correctly. If not, select the board model and port again.
- Check if the code is correct. Copy and paste the text code into it.
- Check whether the port is loose. Reinsert the port.
- Close the software and restart the computer.