Weekly Log #1 – Intro
It was the first week of internship and I reported in for work on Monday 7th Jan. The first item on the agenda was an introduction to the work place, the expectations and the responsibilities of the job. Furthermore the work timings and other details were given out. My responsibilities had three parts to be completed in three months. Each of which are discussed below:
- SD-card: reading and writing to and from an SD card.
- Ethernet: transmitting and receiving from an Ethernet.
- USB: Transmission and receive, including a server.
The microcontroller that is to be used is the PIC18F97J60 included in the PICDEM.NET2 development board from microchip. The programs are to be coded in high level C programming in MPLABX and to be compiled using the XC8 compiler from microchip. I was also introduced to the version control software github that is to be used in the workplace to keep track of progress.
During the first two days I had some trouble getting used to Ubuntu; the interface used at the workplace, however after checking some tutorials it was easy to play around with and I was able to interact with the software and github. Furthermore the MPLAB I used before was a different version and it took some time for me to navigate around the new version. The first thing I had to do was create a simple software to test the board and get used to its connections etc. For this I wrote a code to light up the LED’s connected to the PORT D of the board.
Next I had to get started on the SD card. However before jumping straight into coding the card, I need a way of testing out if my codes work or not. Therefore I have to create a UART connection with the microcontroller and the PC.
The UART connection has three parts to it; configuring the microcontroller’s transmit, receive pins and the baud rate. The PIC used in this project has two UART ports. Microchip provides an inbuilt library for the UART function named uart.h. At first when the library was used there were some problems with command recognition. This problem was solved by defining the PIC again in the codes. By the end of the week I was able to write a program to read and write to the PIC, but the output from the MCU was gibberish indicating that my configuration bits have some problem. I have still not been able to solve this problem and have tried many ways such as changing the SPBRG value and setting everything to off etc.