Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

16bit Noob: PIC24

Status
Not open for further replies.
I'm starting out with the PIC24F chips - I've only used 8bit instruction set chips before. Can anyone recommend a good tutorial website or book for the PIC24s? Thanks!
 
There more like programing for the Pc from what I have read.
I started with a pic32 to much chip for some one that didn't no C from assembly
so I got my hands on a 16f690 and the pickit2. Now I know a little the pic 32 and the 24 don't look to hard
 
I always program the 8bit PICs in C - so the C compiler won't be a problem. I was having trouble figuring out the syntax for the config bits and the interrupt, so the examples are helpful.
 
Interrupts are all vectored on the 16bit PICs. The learning to fly site has some good examples.
Some 24H config settings
Code:
#include <p24HJ12GP201.h>

    _FGS( GSS_OFF & GCP_OFF & GWRP_OFF )
    _FOSCSEL( FNOSC_PRIPLL )         // PLL enabled
    _FWDT( FWDTEN_OFF )
    _FICD( JTAGEN_OFF & ICS_PGD1 )
    _FOSC( POSCMD_EC & OSCIOFNC_ON & FCKSM_CSECME )    // external OSC, RA3 I/O
    _FPOR( 0x0004)                    // 16ms startup delay

An 24H interrupt example
Code:
void __attribute__ (( interrupt)) _T1Interrupt ( void)
 
Bill that chip is cheap and 18 pin p-dip I think I'll get some of the 24HJ12GP202 and try them it's the bigger brother
28 pins and $3.31 each cool I'm starting to like C any ways
 
Last edited:
I ordered the PIC24FJ64GA002, but I'm practicing with the PIC24F16KA102. I was told I needed a ton of RAM to run the IrDA stack protocol. The PIC24H chips have nice specs, but I'm running off of a CR123 battery, so I needed something that could run on less than 3V.
 
Is this a common error? I'm using ICD3 as a programmer, which is working correctly.

The following memory regions failed to program correctly:
Configuration Memory
Address: 00f8000c Expected Value: 00000000 Received Value: 00000080
Programming failed
I've commented out just about everything in the code, including the configuration statements, and this chip has previously programmed correctly.
 
I'm using the USB (6ft I think) and RJ-11 (6in I think) cables that came with the ICD3. The RJ-11 jack is connected to the breadboard through an adapter that I made. I just retested the connection, and the ICD3 recognizes the chip as the correct target device.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top