Combining Tutorials for Serial Communication on PIC16F18345

As I read through the tutorials mentioned in the previous two posts, I tried to follow along on my tool with the long name “MPLAB Xpress PIC16F18345 Evaluation Board“. This was a good exercise because those tutorials were written for different demonstration boards. Following along required some modifications to run on my specific evaluation board, which meant I had to have enough comprehension to know what I needed to do. I couldn’t get away with just monkey-see monkey do.

Case in point: the serial communication project in the MCC tutorial. There were a few differences to reconcile before I got it up and running on my own hardware.

By this point in my PIC self-education, I knew how to resolve most of the differences. The PIC itself was different but not a hinderance. The tutorial’s PIC16F1709 has the same USART module as my PIC16F18345 and understood the same instructions. The tutorial called for a PICkit 3 programmer/debugger which is different from the programmer built into my evaluation board but I’ve learned how to program my board. And the tutorial used the full-featured MPLAB X IDE application whereas my board was designed for the web-based MPLAB Xpress. For the most part it was a matter of navigating different menu structures.

The serial communication lines, though, got a little trickier. The tutorial calls for a PICDEM Lab II development board equipped with a MCP2221 breakout module to allow serial communication back to the PC. I thought I was stuck until I found a serial communication example specific to my evaluation board. This is where I learned the board has a built-in serial communication module hard-wired to specific pins and routed back to the PC connected to the USB port.

USART diagram
This diagram in Microchip’s tutorial labelled chips with different numbers than what’s actually present in our setup, but we get the idea.

From there it was a matter of combining bits and pieces from both tutorials in order to assemble a project that implements the serial communication functionality. This project is also where I experimented with tracking MPLAB X project directories in Github, so I could share the results with the world.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s