• Blog
  • Parts Sources
  • Form Test
VccGnd

Minimal PIC18F45K50 Breadboarded

1/29/2014

6 Comments

 
I breadboarded a minimal PIC18F45K50 circuit.  The LED in the circuit was added to so I can test a minimal "blink the LED" app.  This minimal circuit does not yet include the USB connector, nor powering via the USB bus.  However, it does interface properly to the PICkit 3 programmer (via the 6-pin male header to lower left of IC, rows 21-26 of breadboard), and I was able to blink the LED and set up breakpoints from the MPLAB X IDE.

In case you're wondering how the LED manages to be on despite there being no power applied, it's actually off.  What you're seeing is the camera's flash being reflected!
Picture
Added 2/25/2014: In response to comment from hoylegj, here is a zip file of the source.  Really just a few lines in main.c, plus changing the default auto-generated configuration settings in configuration_bits.c to use the internal oscillator.
blink18f45k50.x.zip
File Size: 21 kb
File Type: zip
Download File

6 Comments
hoylegj
2/24/2014 03:59:26 am

would you have the code, I'm trying to do the same and failing

Many thanks

Reply
VccGnd
2/24/2014 07:15:05 pm

Hi hoylegj:

Since I don't know how to include an attachment in the comments area, I modified the main post to include an attached zip file:

1. You should modify the Project Properties to use the PICkit3 that you have attached (serial number shows up).

2. When debugging, a dialog box will pop up asking "Single-Supply ICSP Enabl bit = ON Would you like MPLAB to change the config setting(s) and continue?" I click Yes to this.

3. Should blink LED on RA4 (pin 6).

4. I'm using MPLAB X IDE v2.00 with XC8 v1.30

Let me know if it works for you.

Reply
hoylegj
2/25/2014 06:31:35 am

Your a star, many thanks works a treat, Now I can work out what I've been doing wrong. thanks again, Geoff

Reply
hoylegj
2/26/2014 07:39:01 pm

Hi VccGnd, may I ask a silly question.. I'm missing something basic I think, we set TRISA to 0 (output all ports), we xof 0x10 so bit 4 is either 1 or 0. now, I keep looking at this and don't understand, 0x10 should set bit 4 and this should be RA4 (pin 6), but we are trigging RA0, (pin 2) and that should be 0x1, what am I missing?
Many thanks Geoff

Reply
hoylegj
2/27/2014 03:35:56 am

I was having a bad day, lost the pot, all ok now :-) thanks

Reply
VccGnd
2/27/2014 06:14:57 am

Glad to hear all is okay now :-)




Leave a Reply.

    VccGnd

    Hardware with a software twist.

    Archives

    February 2014
    January 2014
    September 2012
    August 2012
    July 2012

    Categories

    All
    7LED
    Android
    Ascii
    Crystal Free USB
    Crystal-Free USB
    Dev Boards
    MSP430
    Overviews
    PCB
    PIC8
    Sourcing

    RSS Feed

Powered by Create your own unique website with customizable templates.