Re: Leaves the mainloop???

Originally Posted by
richard
try again with a red led and no resistor, i'm talking overloaded pin
yout lat code worked but...
I used this
WDTE_OFF and it didnt come out of mainloop - worked
I also tried this
PWRTE_OFF - and I was able to write to my fet which had a load connected to it - didnt work right before I changed PWRTE_ON. (NOT SURE WHY)
Also - I know trisa = % 11101101 makes the inputs and outputs - but what does your code indicate? (why 8?)
I have this:
A0 - Led1 output
A1 - led2 output
A2 - Analog in
A3 - CLR
A4 - TTL Output to turn on FET
A5 - Input (TTL)
Ports C are all ttl inputs
can you help me set these registers up richard? -
VERY MESSY
OSCCON1=%00000011
OSCCON2=%00000011
INLVLA = %00000
INLVLC = %00000
TRISC = %11111 ' MAKE INPUTS
DEFINE OSC 4
OSCFRQ_4MHZ
ANSELA = PORTA.2 ' MAKE ANALOG INPUT
ANSELC = %00000 ' MAKE DIPSWITCH INPUTS DIGITAL
Last edited by pescador; - 1st June 2023 at 00:05.
My dad never liked you...
Bookmarks