PIC18 I/O port mixup??

Post your requests and ideas on the future development of mikroPascal.
Post Reply
Author
Message
Stefan
Posts: 2
Joined: 01 Sep 2006 11:06

PIC18 I/O port mixup??

#1 Post by Stefan » 01 Sep 2006 11:13

I'm programming a Data Acquisition system on a PIC18F4455. It must be something I missed? When simply coding the PIC to enable PORTB as an output and then to set all 8 output pins high(5 Volt), ONLY PIN B0,B1,B2,B6 AND B7 GOES HIGH??? Why is it that pin B3, B4 and B5 doesn't go high? Is there a config bit that is responsible for this?? Please help!!

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: PIC18 I/O port mixup??

#2 Post by zristic » 01 Sep 2006 11:29

See in PDF for p18F4550 whether PORTB has AD converter. If so, then set ADCON1 to 0xFF. Also, examine available config flags provided by PICFLASH (if you are not willing to study PDF).

anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

#3 Post by anton » 01 Sep 2006 23:41

Hi Stefan,

I would suggest you swith to the PIC 18F4550 since the compiler and USB routines are tested on the 4550 and 2550. I'm not sure about the 4455.

The difference is that the 18F4550 has 32KB and the 18F4455 only has 24KB

If you would like to use the PIC18F4555 I see in the datasheet you must set

Code: Select all

ADCON1 := $0E;
Anton

PS: Ek sal vir jou maandag een by die universiteit 'n PIC18F4550 kan gee as jy een soek.
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)

Post Reply

Return to “mikroPascal Wish List”