• Post author:
  • Reading time:3 mins read
  • Post category:IDE

Shakti “E Class” has 2 Universal Asynchronous Receiver Transmitter (UART) ports and “C Class” has 1 Universal Asynchronous Receiver Transmitter (UART) port. 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.

UART PINOUTS:

arduino

WHAT YOU WILL NEED: 

  • Arty7 35t/100t board with either pinaka, parashu or vajra programmed.

LET’S START,

Step 1: Install Arduino IDE

  • Firstly, download and install Arduino IDE 1.8.9 or the latest version 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 URLs in the Files->Preferences->Settings.
https://gitlab.com/shaktiproject/software/shakti-arduino-ide/-/raw/master/package_shakti_index.json

  • 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.
arduino

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 parashu here.

arduino

Step 3.2: Then, Go to Tools -> Port and select the port.

arduino

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.
arduino

Step 4: Testing the sketch

  • Firstly, Go to File->Examples->UART and select hello_world
arduino
  • 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 monitor to see if the Program has been uploaded successfully.

Serial Monitor Output:

arduino

Also, Check out our article on Platform IO IDE on windows and Ubuntu.

This Post Has 2 Comments

  1. Avatar
    Sangeeta Palekar

    I am getting following error. Kindly help

    Arduino: 1.8.13 (Linux), Board: “Parashu, Default”

    /home/vna/snap/arduino/50/.arduino15/packages/shakti/tools/riscv32-unknown-elf-gcc/1.0/bin/../libexec/gcc/riscv32-unknown-elf/8.2.0/cc1plus: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
    exit status 1
    Error compiling for board Parashu.

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

Leave a Reply