Archive for the “General” Category

General items matching the theme of this site

Last Tuesday (27 Jul 2010) I attended a meeting at the South Australian PIC User Group (SAPUG) which was excellent. A great bunch of people that are all keen to help. Ian from The Leon Audio Company gave a talk on how to use MOSFET’s with a PIC and some things to watch out for. They are a great device, but needs to be used in the right way or you destroy your PIC MCU. The group is planning a weekend of activities in October so keep the weekend of 16th and 17th free and keep an eye on the groups web site for details at http://www.users.on.net/~sapug/

Comments No Comments »

I’m on a journey of learning and need to make a decision on which way I go first. When I ordered my Explorer16 board, I also ordered the PIC32MX460F512L PIM, a 32-bit USB capable 100pin chip for the Explorer 16. I also ordered a couple of books from Amazon but they look to be still quite a way off. Anyway I went looking through Books24x7.com to see what they had and came across a book Programming 32-bit Microcontrollers in C: Exploring the PIC32 by Lucio Di Jasio which I’ve started going through. It’s written for people like me who have some understanding of C and of the PIC although very limited. Its broken into days, well so called days. I got to day 10 over this weekend. So very quickly, I think I’m being swayed to the faster 32-bit world at the moment.

So entries here are not as much this weekend as I’ve learnt how to control the LCD using the PMP port (Parallel Master Port), how to use interupts, timers and a few other bits and pieces. Also starting to develop a bit of a library of goodies along the way.

It’s late, and tomorrow is a work day so till later….

Comments No Comments »

PICtail Plus connector on the Explorer 16

One of the 120 pin PICtail Plus connectors on the Explorer 16 Development Board.

The Explorer16 is packed with a whole lot of stuff in a very small package. Making sense of it all can be a bit challenging when first getting it out of the box and playing with it. Anyway I’ve put this table together (and it’s also available as a spreadsheet download). It shows all the connections on the Explorer 16 development board from the perspective of the 120 pin PicTail Plus connector. 

The PICtail Plus connector is arranged into logical sections of 2 x 30 pin sections and a 60 pin section. The two 30 pin sections contain most of the communications and power data lines with a small number of standard I/O. The 60 pin section picks up on the rest of the ports on the MCU with whole banks of I/O .  Microchip also have blank prototype boards with labelled edge connectors and break-out pins for all the data lines on the PICtail Plus.

I ended up buying the add-on connector and soldering it to my board to provide flexibility for future projects. I’m not ready for them just yet but sure I’ll end up getting there.

Anyway, onto the table. The highlighting is to help identify which side of the connector the particular data line is on.

The Excel file for the above table is here.

Here is what the spreadsheet covers

The Explorer 16 Development Board 100pin version (DM240001)
- Switches/pots/leds
- JTAG connector
- PICkit2 programmer
- ICD2
- U2 PIC18F4550
- U3 MAX3232
- U4 Temp Sensor TC1047A
- U5 EEPROM 25LC256
- U6 Multiplex/Demultiplex CD74HCT4053PWR
- U7 Multiplex/Demultiplex CD74HCT4053PWR
- LCD (1) Truly TSB1G7000

The following Plug In Modules (PIM) for the above board
- PIC24FJ128GA010 100 pin PIM (MA240011)
- PIC24HJ256GP610A 100 pin PIM (MA240012) (nb same as PIC24HJ256GP610 but handles higher temps)
- dsPIC33FJ256GP710 100pin PIM (MA330011)
- PIC32MX360F512L 100 pin PIM (MA320001)
- PIC32MX460F512L 100 pin PIM (MA320002)

The following PICtail and PICtail Plus add-on expansion boards:
- SD/MMC PICtail (AC164122)
- Fast 100mb Eth PICTail Plus (AC164132) (nb: only the SPI interface at the moment. PMP coming)
- Graphics LCD Controller PICtail™ Plus v3 SSD1926 Board (AC164127-5) with:
  – 5-wire touch sense & disp backlight
  – (U1) SSD1926
  – EEPROM (U3) SST25VF016B-50-4C-S2AF
  – (U2) MT29F2G08AADWP

Comments No Comments »

This is my Explorer 16 Development Board.

My Explorer 16 Development Board with the 2nd PicTail Plus connector already soldered to the board.

My Explorer 16 development board arrived yesterday so have been playing with it. Initially the example code that came with the PIC24FJ128GA010, doing some basic things like modifying the looping LCD text, then writing my first program to test the LED’s on the board. Had to make sure it all worked. And as usual stuff from Microchip just worked. For those that might have just bought one because they are on the same journey I’m on, begining with the PIC24, here is the source so you can make sure your LED’s are working.

Very basic, just flashes all 8 LED’s on then off about once per second.

#include <p24FJ128GA010.h>

int main()
{
  AD1PCFG = 0xffff; // configure PortA as digital
  TRISA = 0×0000; // configure PortA as output

  while(1)
  {
    // Turn on the LED’s
    LATAbits.LATA0 = 1;
    LATAbits.LATA1 = 1;
    LATAbits.LATA2 = 1;
    LATAbits.LATA3 = 1;
    LATAbits.LATA4 = 1;
    LATAbits.LATA5 = 1;
    LATAbits.LATA6 = 1;
    LATAbits.LATA7 = 1;

 // delay for about 500mSecs
    msDelay(500); 

 // turn of the LED’s
    LATAbits.LATA0 = 0;
    LATAbits.LATA1 = 0;
    LATAbits.LATA2 = 0;
    LATAbits.LATA3 = 0;
    LATAbits.LATA4 = 0;
    LATAbits.LATA5 = 0;
    LATAbits.LATA6 = 0;
    LATAbits.LATA7 = 0;

 // delay for aprox 500mSec
    msDelay(500);
  }
}

int x=0;

void msDelay(int d) // The delay routine
{
  while (d>0)
  {
    for (x=0; x<500; x++)
    {
    }
  d–;
  }
}

Assuming you know how to create a project in MPLab, build it and then program the chip you shouldn’t have any problems.

Next will be re-write this to use a timer and interupt to do the timing releasing the main loop for other things.

 (Note: I’m going to leave this code as is as it reminds me of progress. While it works, there are far more elegant ways of writing this.)

Comments No Comments »

First a little about this blog. It’s a log of my various electronics exploits. It includes a raft of things from simple 555 timer projects to rudder pedal controller using USB to fly Flight Simulator to weather instruments to other “just playing” embedded systems that I build.

Most will include detailed instructions on how to go about building and programming.

Other things I’ll include are full C source code and assembler source code if I use it. My main area of interests in embedded (at the moment) is the Microchip PIC family, mainly the PIC24, dsPIC33 and PIC32 but have done quite a bit in the past with the PIC18 especially the PIC18F4550 and PIC18F2550.

I should point out, I’m not a professional in these fields. It’s a hobby and I continue to learn every day.

Comments No Comments »