Home > LCD, microcontroller, pic32 > Introducing the Commander32

Introducing the Commander32

Hi-dilly-ho neglete-arino, I mean blog. I’ve put together a new microcontroller setup after the previous one was too slow at calculating fractals.

This lovely set of complex numbers only took several hours to generate.

This new setup, dubbed the Commander32, consists of a Pic32 Starter Kit, eflighworks companion board(barebones w/ socket, I added the rows of headers) and an HX8347 controlled 3.2″ TFT LCD from eBay. The code for the previous 18F controller ported easily, once switching to writing to the ports with the LATx registers instead of the usual PORTx. Since Port B is 16-bits wide, this was connected directly to the LCD data pins, and made programming even easier. The remaining four control pins were connected to the upper bits of Port G, that didn’t have any other peripheral features. I might switch the data  pins to use the PMP feature to free up the analog pins on port B.

Let's give the new microcontroller a big round of micro-plause. Micro-plause? I'm not writing that.

The touchscreen is also working, and improved.  An app note on calibration from Ti showed how to use a couple matrices to generate the conversion equation coefficients. It was easiest to solve with Matlab, instead of expanding manually and having the microcontroller crunch the numbers. The next issue was the considerable noise in the x direction, causing one point to stretch to a little line. This was fixed by taking multiple readings, then averaging. So now I plenty of pins and  speed to use the sd memory socket on the LCD board, plus a wireless device and some sensors or something. Porting the code was easy enough, and was more of finding the tricks for the Starter Kit, like what pins not to use with debugging.  Maybe I’ll build a micro-touch-circuit-thing, and call it iTouchMyself.

Advertisements
  1. Craig Rodgers
    January 24, 2012 at 9:42 am

    Hi, Im just using the HX8347 display. How did you go about getting the graphics to work. Are you drawing bit maps onto the screen or litterally placing every pixel on the screen with a chosen color? Or are you using a library which means you can draw it out first?

    Ive got mine filling the screen with different colours and i can place individial pixels, but i dont know what to do for a design perspevtive and making it look good. Even writing text is going to take a lot of figuring out if i need to figure out where every pixel goes for differnt fonts!

    Im using it in SPI mode.

    Thanks,

    Craig

    • January 24, 2012 at 11:19 am

      Hey Craig, so far it’s just placing pixels or filling a box. I posted some code for drawing shapes and text you can check out for an example.

  1. No trackbacks yet.

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

%d bloggers like this: