|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Programming a 2nd PIC
I knew you would be back on line asking for help with the pic demo board. First, unless I missed something, the demo board doesn't support in circuit programming. I believe you have to use a separate chip programmer. This means that you have to pop the processor out- program it- pop it back in - test - pop it out- reprogram - pop it in - test. This isn't very productive.
Second, using the pic compiler and IDE provide allot of power, but add complexity to the proto typing effort. There is allot of initializing that has to be done for both the processor, C compiler, linker and assembler. IFI has done this for us. You'll have to duplicate it and strip out the stuff they set up for the dual processor. Third, if your using the free software from microchip , the optimizer is left out. Your code will take more memory in most cases. If you use the IFI provided software, they had it customized for the IFI controller. Don't Know if it affects working with other chips. There are other options out there that might be better for experimentation and proto typing. What worked for me is the Kronos robotic dios chip and a work board http://www.kronosrobotics.com/xcart/...52&cat=0&page= http://www.kronosrobotics.com/xcart/...68&cat=0&page= The work board has a solderless bread board for proto typing. The Dios chip is the same chip your using only it has a powerful basic interpreter on it. They have examples on site for sonar sensors, Sharp IR senors, digital compasses, serial communications, PWM, quadrature, timers, etc. Allot of work has been done for you. You can make a program change and 3 seconds later your code is running. I've used this set up with some students that just couldn't get started this year with programming on our team. I spent a couple hours with them and this setup. They're off and running teaching me now. |
|
#2
|
|||
|
|||
|
Re: Programming a 2nd PIC
the demo board supports programming through the mplab ICD2 through an rj-11 plug on the board. and yea, i quickly became aware of how i had to rewrite the start up, pic def, and alias file myself. Which i have no problem doing excpet for the fact that I seriously got lost in the pic def file. They're defnining things in structs that I can't find anywhere on the data sheet (ie the following)
Code:
extern volatile near unsigned char RCSTA2;
extern volatile near union {
struct {
unsigned RX9D:1;
unsigned OERR:1;
unsigned FERR:1;
unsigned ADEN:1;
unsigned CREN:1;
unsigned SREN:1;
unsigned RX9:1;
unsigned SPEN:1;
};
struct {
unsigned RCD8:1;
unsigned :5;
unsigned RC9:1;
};
struct {
unsigned :6;
unsigned NOT_RC8:1;
};
struct {
unsigned :6;
unsigned RC8_9:1;
};
} RCSTA2bits;
maybe i'm approaching this totally wrong any advice? |
|
#3
|
|||
|
|||
|
Re: Programming a 2nd PIC
thanks for the advice on that other prototyping board, it sounds extremely useful
|
|
#4
|
||||
|
||||
|
Re: Programming a 2nd PIC
Quote:
-Kevin |
|
#5
|
||||
|
||||
|
Re: Programming a 2nd PIC
I believe RCD8:1 means RCD8 is defined as an alias for the first bit of the structure, and the :5 is a placeholder so the next 5 bits are not aliased as anything, and then RC9 is defined as an alias for the 7th bit of the structure.
|
|
#6
|
|||
|
|||
|
Re: Programming a 2nd PIC
wow, so that .h file just saved me 3 days
thanks for the heads up on that. that's exactly what i needed |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VEX programming | Gene F | Programming | 14 | 08-08-2006 22:21 |
| Organizing a programming team. | scitobor 617 | Programming | 7 | 28-01-2005 19:18 |
| 'Fix It Window' and Programming.... | JMac | Programming | 19 | 25-01-2005 18:57 |
| Programming and Electronics — Getting Started | Sidney San Martín | Technical Discussion | 7 | 12-01-2005 15:25 |
| pic: Match 0105: 2nd highest score in the nation | CD47-Bot | Extra Discussion | 6 | 31-03-2003 11:14 |