Week #12 – SD Cmds

I tested out the code I had already written and found out that the power up sequence was not working as expected. After consulting with my supervisor he advised me to enable pull-up resistors in port B and test the input and outputs for the each pin. By setting the INTCON2bits.NOT_RBPU to 0, I was able to enable the pull up resistors. I then set my port B as output and checked to see the voltage across the pins when Read more

Week #11 – SD Comms

After adding the software SPI, I started out writing the program. There are four working modes in SPI and the SPI timings for Mode 0 is the proper setting for the SD Cards. After setting the mode I started defined the values for the commands that are to be used. Then I started with the power up sequence. This is necessary to synchronize the card with SPI clock pulses and to let the card know the change in clock pulses. Read more

Week #10 – SPI Comms

I was still working on the SD card this week. I took up from where I left off and started with setting up the SD card. I soldered the pins onto the little board for holding the card. This board has a pre-made insertion point for the card and which all the pins are soldered to the card. The soldering had to be checked for connectivity using a multimeter after ensuring that all connections are fully made and that there Read more

Week #9 – SD Card

I started on the SD Card portion of the project. The objective of this is to read and write to and from the card, and finally to download data from the network and store in SD Card. I started my research on SD Cards. From this study I found that there are three protocols for communicating with SD Cards. The most popular of which is the SD mode and the SPI mode. There are also two types of SD Cards Read more

Week #8 – SSL Client

This week I worked on the Generic HTTP Client with SSL. Initially I tried to run the original program provided by the MICROCHIP TCPIP stack. I enabled the STACK_USE_SSL_CLIENT in TCPIP ETH97.h found in TCPIP Config.h . Then I added the RSA.c and ARCFOUR.c files which were necessary in order to to run the SSL algorithm. RSA is the library for an algorithm for public key decryption. I compiled the file and built it, however I kept getting the error Read more

WEEK #7 – Git Commit

I made my first commit in git this week, by creating a repository and adding all the necessary files to the project. First I had to go through the git flow chart which was a very helpful graphical aid in understanding the branches associated with github. I first added the unchanged initial files of TCPIP stack provided by MICROCHIP. I then removed the unnecessary include and library files and committed them to a release branch. I also learned the ways Read more

WEEK #6 – Telnet Server

Happy Chinese New Year to everyone. The week started off with a telnet server module. The initial application was provided by microchip, and I tried to run the program. In order to run this application the user has to uncomment STACK_USE_TELNET_SERVER and define AN0String in the main application. Going through the application code further showed that the TCP socket for Telnet was not defined yet, however the socket is already available in TCPIP ETH97.h. After uncommenting the TCP_PURPOSE_TELNET, TCP_ETH_RAM, the Read more

Week 5 – TCP/IP Layer

I continued where I left off from last week; setting up the physical layer for Ethernet connection. After taking a good look at the documentation available, I realized that there were a minimum of 3 commands required to get the line up and running. These commands were, including TCPIP.h header file, initializing the stack by calling “StackInit”, and looping the “StackTask” and “StackApplications” commands. After programming the code the port LED’s lit up indicating the successful connection from the PIC Read more

Week 4 – Ethernet Layer

This week I started work on the network connections from the chip, mainly the ETHERNET communication from MCU to network. I was fairly new to the subject but not completely as I have completed my Data Communication module already, hence was familiar to the OSI model and other network conventions. However I soon came to realize that I was actually at the tip of the iceberg and just had the general knowledge of network connectivity. I set out to research Read more

Week 3 – SPI Comms

This week I worked on SPI (Series Peripheral Interface) communication from the PIC18F97J60 to 25LC256 series EEPROM which comes with the PICDEM.NET2 development board. It was a completely new area for me and I was reading up a lot about the basics of SPI communication supported by the PIC. I was able to find numerous examples available from the microchip website giving instructions on the aspects of coding for SPI communication. The biggest help for me in understanding and coding Read more