KS0503 Keyestudio PRO MICRO 5V 16MHZ Development Board(Black and Eco-friendly): Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
Line 133: Line 133:


<br>[[File:Ks0503-=21.png|800px|frameless|thumb]]<br>
<br>[[File:Ks0503-=21.png|800px|frameless|thumb]]<br>
=== 5.3 Arduino IDE Setting ===
Click[[Image:0486-12.png|200px|frameless]] icon,open Arduino IDE.
<br>[[Image:0085=14.png|400px|frameless]]<br>


== Hello World! ==
== Hello World! ==

Revision as of 08:24, 9 April 2021

Keyestudio PRO MICRO 5V 16MHZ Development Board


Introduction

The processor core of Keyestudio PRO MICRO development board is ATMEGA32U4-MU, fully compatible with ARDUINO.
It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable to get started. 

It has 18 digital input/output pins (of which 5 can be used as PWM output), 9 analog input, a 16 MHz crystal oscillator and a micro USB port.
In addition, its working voltage is 5V and we can supply power via micro USB cable and port RAW GND (DC 7-9V).
It is easy to integrate this Micro in everyday objects to make them interactive.
To facilitate the physical design, the board is not welded with pin headers, so you can solder the pin headers by yourself. And the package includes 2pcs of yellow 1*12 2.54 straight pins and 1m black micro USB cable.


Specification

  • Microcontroller: ATMEGA32U4-MU
  • RAW: DC 7-9V
  • VCC: 5V at 500mA
  • Digital I/O Pins:18 (of which 5 provide PWM output)
  • Analog Input Pins:9
  • Maximum current for chip: 200mA
  • Maximum current per pin: 40mA
  • Recommended current per pin: 20mA
  • 8-bit Atmel AVR
  • Flash Program Memory: 32kB
  • EEPROM: 1kB
  • Internal SRAM 2.5kB
  • ADC:10-bit
  • PWM:8bit


Pin Interfaces


thumb

Specialized Functions of Pins

  • Digital Port:RX(D0), TX(D1), D2-D10, D14-D16 and A0-A3(D18-D21)
  • Analog Port:A0-A3, D4(A6), D6(A7), D8(A8), D9(A9)and D10(A10)
  • PWM Port (Pulse-Width Modulation)::D3、D5、D6、D9、D10
  • External interrupt: D3(interrupt 0), D2(interrupt 1), D0(interrupt 2), D1(interrupt 3) and D7(interrupt 4)
  • Serial Communication Port:RX (D0) ,TX (D1)
  • SPI Communication Port:D14 (MISO), D15 (SCLK) and D16 (MOSI)
  • I2C Communication Port:D2 (SDA) and D3(SCL)
  • RAW:external power DC 7-9V


Download the Arduino IDE

Enter Arduino IDE official website:https://www.arduino.cc/, Clickthumb
thumb

thumb

You can download 1.8.13 version In this project, we use 1.8.12 version


thumb

thumb

thumb


Installing Driver

Windows 10:
The driver will be automatically installed if you plug control board to your computer. Then the COM port is show below:


thumb

You need to install it manually if your computer is other Windows system.
We will take win7 system as example.

1. Place the driver folder on your desktop.
The driver files are shown below:


thumb


2. Connect board to your PC with Micro USB cable, open device manager.


thumb

3.Right-click it and yellow exclamation mark appears


thumb

4. Click“Browse.....manually”


thumb


5. Find the“drivers”file,and tap“Next”.


thumb

6.Click“install this driver software anyway”


thumb

7. Then click“Close”and check the serial port.
thumb

thumb

5.2 Set Boards Manager

We need to set board before using it. Firstly we need to add the website of board manager in the

Website: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json

As shown below:


thumb

thumb

Then restart Arduino IDE.
The board is shown below:


thumb

Search sparkfun and install the related files.


thumb

Click “Close” when the installation is finished.


thumb

Then find outthumb as follows:


thumb


5.3 Arduino IDE Setting

Click0486-12.png icon,open Arduino IDE.


0085=14.png

Hello World!

Copy the following code to Arduino IDE.


int val; 
int ledpin=13; 
void setup()
{
Serial.begin(9600); 
pinMode(ledpin,OUTPUT);
}
void loop()
{
val=Serial.read();
if(val=='R')
{
digitalWrite(ledpin,HIGH);
delay(500);
digitalWrite(ledpin,LOW);
delay(500);
Serial.println("Hello World!");
}
}

Set board and COM port, the corresponding board and COM port are shown on the lower right of IDE.


thumb

Click0486-20.pngto start compiling the program, and check errors.


thumb

thumb

Click0486-23.pngto upload the program, upload successfully.


thumb

thumb

Tap thumbto open serial monitor, set baud rate to 9600, input "R" and click“Send”. Then RX indicator flashes and serial monitor shows "Hello World!", which means "Hello World!" is sent by PRO MICRO development board.


thumb

Package

  • Keyestudio PRO MICRO 5V 16MHZ development board*1
  • USB cable *1
  • Yellow Pin headers * 2pcs