Shakti “E Class” has 2 Universal Asynchronous Receiver Transmitter (UART) ports and “C Class” has 3 Universal Asynchronous Receiver Transmitter (UART) ports. In this tutorial, we are going to discuss Universal Asynchronous Receiver/Transmitter (UART) and using this protocol we are going to print “Hello World” using Arduino IDE.
HOW UART WORKS:
The UART that is going to transmit data receives the data from a data bus. Then, the data bus is used to send data to the UART by another device like a CPU, memory, or micro-controller. Data is transferred from the data bus to the transmitting UART in parallel form. After the transmitting UART gets the parallel data from the data bus, it adds a start bit, a parity bit, and a stop bit, creating the data packet. Then, the data packet is sent out serially, bit by bit at the Tx pin.
The receiving UART reads the data packet bit by bit at its Rx pin. The receiving UART then converts the data back into parallel form and removes the start bit, parity bit, and stop bits. Finally, the receiving UART transfers the data packet in parallel to the data bus on the receiving end.
WHAT YOU WILL NEED:
- Arty7 35t/100t board with either
pinaka, parashu or vajraprogrammed.
Step 1: Install Arduino IDE
- Firstly, download and install
Arduino IDE 1.8.9 or the latestversion tarball from the Arduino website.
- Then unpack it and run the installation script as directed.
Step 2: Install SHAKTI supported boards in IDE
- Add the link below to the
Additional Boards Manager URLsin the
- Then, open the Board Manager Dialog Box,
Tools->Board: -> Select Board Manager
- In the Boards Manager Dialog Box, search the list and install SHAKTI boards.
Step 3: Setting up Arduino IDE for SHAKTI
As we have installed the SHAKTI successfully, now we can proceed with setting up the IDE.
Step 3.1: Firstly, Go to Tools->Board:->Shakti. Then select the board you are going to use.
For instance, we use
Step 3.2: Then, Go to Tools -> Port and select the port.
Step 3.3: Atlast, Go to Tools ->Programmer and select Shakti OpenOCD Flash or Shakti OpenOCD RAM based on the need.
- Shakti OpenOCD Flash – This option is used to upload the program to your flash memory. The program will be executed every time the board is reset.
- Shakti OpenOCD RAM – This option is used to upload the program to RAM. The uploaded program would not be retained after a reset.
Step 4: Testing the sketch
- Firstly, Go to File->Examples->UART and select hello_world
- Now, Click on the
Verify icon(Tick icon on top left ) to compile the program.
- Then, Click the Upload icon on Arduino IDE (Right arrow key next to verify) to upload the program.
- At last, Switch to the
serial monitorto see if the Program has been uploaded successfully.
Serial Monitor Output:
Also, Check out our article on Platform IO IDE on windows and Ubuntu.
Mainak is an intern at the RISE labs. He has also interned at the Department of Atomic Energy (UGC-DAE-CSR), Kolkata. His favorite subjects are “Digital Electronics” and “Microprocessor & Micro-controller”. He is also an open source library contributor at Arduino.