Exact match. Not showing close matches.
'[PIC] 18f452 and RA2'
I'm trying to make a program that drives a LED on port RA2 on. Actually, I
need to output on RA0..RA3, but it doesn't work.
Here's my code in mikropascal:
ADCON0 := $00;
ADCON1 := 7;
TRISA := 0;
PORTA := $FF;
I tried a few different configurations for ADCON1, but nothing seems to
change. The interesting thing is that RA0, 1 and 3 go high, but not RA2....
any ideas besides hardware failure (which I don't believe).
PS: Sorry for the first message without the [PIC] header
Try to use the LATA registers instead of writing directly to PORTA, also try
out what happens if you just put and endless loop at the end of the code
(before the 'end.' directive). What might happens is that if Micropascal
does not stop the execution at the 'end.' directive then it may go furter in
the program memory executing all the instructions and there may be some
unexpected code fragments. Just an idea as the port initialization seems to
On Wed, Jul 9, 2008 at 6:58 PM, Padu <merlotti.com> wrote: padu
Can you just double check that it isn't
RA4 that you have trouble with.
Or try another 452 chip.
> I tried a few different configurations for ADCON1,
Don't do that, just use whatever is right for you...
Or write a short test-prog i ASM to verify your MP code.
> Padu , check your device datasheet. In those pins you have
> the Analog Comparator Output.
Actually I could not find anything like that in the PIC18FXX2
It's the 18F452, right?
On Thu, Jul 10, 2008 at 5:01 PM, Mauricio Giovagnini <
yahoo.com.ar> wrote: maugiovagnini
Tamas Rudnai escribió:
> Hi Mauricio,
>> Padu , check your device datasheet. In those pins you have
>> the Analog Comparator Output.
> Actually I could not find anything like that in the PIC18FXX2
> It's the 18F452, right?
Thanks Tamas for pointing that. I missread the PIC, I read
18F4520 (a device that I use very often). That's why I
answered about the CMCON reg. :)
Is true, the 18F452 does not have a comparator.
Mauricio Giovagnini (Maunix)
LinkedIn Profile: http://www.linkedin.com/in/mgiovagnini
More... (looser matching)
- Last day of these posts
- In 2008
, 2009 only
- New search...