Go to Post The GDC made something easier??? Link or it didn't happen! - JesseK [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-06-2005, 00:51
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,358
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
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   Spotlight this post!  
Unread 16-06-2005, 11:32
ImmortalAres ImmortalAres is offline
Registered User
no team
 
Join Date: May 2005
Location: Clarkson University
Posts: 33
ImmortalAres is an unknown quantity at this point
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;
i got the first struct and i undersntad what's going on but what on earth is RCD8:1 or the :5 doing. i'm quite lost there.

maybe i'm approaching this totally wrong

any advice?
  #3   Spotlight this post!  
Unread 16-06-2005, 11:34
ImmortalAres ImmortalAres is offline
Registered User
no team
 
Join Date: May 2005
Location: Clarkson University
Posts: 33
ImmortalAres is an unknown quantity at this point
Re: Programming a 2nd PIC

thanks for the advice on that other prototyping board, it sounds extremely useful
  #4   Spotlight this post!  
Unread 16-06-2005, 11:46
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Programming a 2nd PIC

Quote:
Originally Posted by ImmortalAres
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...
You should just use the processor specific header file provided by the compiler. The filename is "p18f452.h" and will be located in the "h" subdirectory located in the compilers directory.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #5   Spotlight this post!  
Unread 16-06-2005, 11:46
fowlerm's Avatar
fowlerm fowlerm is offline
Bringing .NET to Robots
AKA: Matthew Fowler
FRC #0312 (Heatwave); FRC #1369 (Minotaur)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2001
Location: St. Petersburg, FL, USA
Posts: 78
fowlerm has a spectacular aura aboutfowlerm has a spectacular aura aboutfowlerm has a spectacular aura about
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   Spotlight this post!  
Unread 16-06-2005, 12:13
ImmortalAres ImmortalAres is offline
Registered User
no team
 
Join Date: May 2005
Location: Clarkson University
Posts: 33
ImmortalAres is an unknown quantity at this point
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
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 18:03.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi