View previous topic :: View next topic |
Author |
Message |
kam
Joined: 15 Jul 2005 Posts: 59
|
Pic18F452 breadboard question |
Posted: Tue Jul 19, 2005 5:08 pm |
|
|
Hi all,
I'm trying to put my pic18f452 on my breadboard (removing it from the proto board). I think I have it all wired correctly, but since it does not work, I do not! HA!
This is what I've done.
#1. Pins 12 & 31 --> Vss
#2. Pins 11 & 32 --> Vdd. +5v w/0.1 uf cap to ground
#3. Pin 1 --> 10k res --> +5v
#4. Pin 25 --> Serial out to Max232
I got everything working on the protoboard so I know the lcd and max are wired correctly as they have always been on the breadboard and not the protoboard.
Now,
I the software (ccs) I compiled using these flags:
Code: |
// setup chip
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
setup_low_volt_detect(FALSE);
setup_oscillator(OSC_NORMAL);
|
I am NOT using an osc as I want to use the internal...
I checked to make sure power was getting to everything, and that looks good!
Again, I have only hooked up these pins: 1/11/12/25/31/32
Any thoughts?
~Kam (^8* |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Tue Jul 19, 2005 5:38 pm |
|
|
Sorry, but the 18F452 doesn't have an internal oscillator. That's probably the problem.
Refer to chapter 2 of the 18F452's data sheet. |
|
|
kam
Joined: 15 Jul 2005 Posts: 59
|
I'm lost then! |
Posted: Tue Jul 19, 2005 5:49 pm |
|
|
According to the spec on chapter 2, they mention 8 different types etc. They talk about a "RC" which is an internal one. Yes?
So, if that is the case then, I can just add a 4mhz to pins 13/14.
Apart from that, did I miss anything else for my minimal hookup?
~Kam (^8* |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Tue Jul 19, 2005 6:09 pm |
|
|
RC means you hook up an external RC network. It's not internal. |
|
|
kam
Joined: 15 Jul 2005 Posts: 59
|
got it! |
Posted: Tue Jul 19, 2005 6:33 pm |
|
|
You are absolutly correct! I hooked up the chrystal to the osc pins and it works! Thanks for the pointers.
~Kam (^8* |
|
|
|