Hi Folks,
I am using the version 3 Development board and Flowcode ver 3. I am using the PIC18F4520. I have output 255 to PORTA on the simmulator all bits light up on the LED's, however when I download into the FLASH memory of the PIC, bits 6 and 7 dont, I guess this is because I am using an external crystal oscillator. Is this assumption correct. I did the same thing to PORTB and again on the simmulator all LED's come on, however after dowloaded LB5 doesnt come on, I dont know why as I think all my jumpers are not set for LVP can anyone please advise me.
Thank you as always for your much appreciated help
Jag.
Unavailable PORT bits
-
- Posts: 6
- Joined: Thu Sep 18, 2008 3:37 pm
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Unavailable PORT bits
Hello Jag
Im afraid that pins RA6 and RA7 are hardwired to the oscillator circuitry on the HP488 V3 Dev board so even if you disable the external oscillator in the advanced options of PPP you will not see the LEDs lighting up. However if you are then going to take this to the next level eg your own hardware design then the bits RA6 and RA7 will become available to you. There may be hardware limitations on these pins eg open collector only but you will have to refer to the datasheet to find out this information. Hardware limitations can be removed by adding the appropriate pull up or pull down resistor as needed.
Im afraid that pins RA6 and RA7 are hardwired to the oscillator circuitry on the HP488 V3 Dev board so even if you disable the external oscillator in the advanced options of PPP you will not see the LEDs lighting up. However if you are then going to take this to the next level eg your own hardware design then the bits RA6 and RA7 will become available to you. There may be hardware limitations on these pins eg open collector only but you will have to refer to the datasheet to find out this information. Hardware limitations can be removed by adding the appropriate pull up or pull down resistor as needed.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 6
- Joined: Thu Sep 18, 2008 3:37 pm
- Contact:
Re: Unavailable PORT bits
Thanks again Benj,
I am using the 40 pin PIC18F4520 on the development board, as I said before bit 5 of PORTB wouldnt work. I then placed the 40 pin PIC16F877
and all of PORTB worked. Looking at the advanced settings for the PIC under chip ->configure tool menu, the Low Voltage Program option for the 18F877 was disabled and for the 18F4520 it was enabled. Therefore once I disabled the Low Voltage Program option for the 18F4520 all of PORTB started to work. Otherthan disabling the LVP feature there is nothing wrong with what I have done is there ?
Thanks Jag.
I am using the 40 pin PIC18F4520 on the development board, as I said before bit 5 of PORTB wouldnt work. I then placed the 40 pin PIC16F877
and all of PORTB worked. Looking at the advanced settings for the PIC under chip ->configure tool menu, the Low Voltage Program option for the 18F877 was disabled and for the 18F4520 it was enabled. Therefore once I disabled the Low Voltage Program option for the 18F4520 all of PORTB started to work. Otherthan disabling the LVP feature there is nothing wrong with what I have done is there ?
Thanks Jag.
- Steve
- Matrix Staff
- Posts: 3424
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Unavailable PORT bits
The LVP pin can be a source of unnecessary head-scratching.
For 18F devices, the LVP pin is usually RB5. For those 16F devices that have an LVP pin, it is usually RB3 (but some have it as RB4 I think).
When "Low Voltage Programming" is enabled in the configuration data (and it is enabled by default on new devices), the LVP pin will be unusable as an i/o pin. In fact, if you put a voltage onto this pin, it may stop you program from running.
For 18F devices, the LVP pin is usually RB5. For those 16F devices that have an LVP pin, it is usually RB3 (but some have it as RB4 I think).
When "Low Voltage Programming" is enabled in the configuration data (and it is enabled by default on new devices), the LVP pin will be unusable as an i/o pin. In fact, if you put a voltage onto this pin, it may stop you program from running.