williB
New Member
could you post it.??sardineta said:I have my program finished, but when I simulate it in the MPLAB, the TMR0, is not reloaded, does I need to reload it at the end of the ISR before exit? before bcf INTCON T0IF
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
could you post it.??sardineta said:I have my program finished, but when I simulate it in the MPLAB, the TMR0, is not reloaded, does I need to reload it at the end of the ISR before exit? before bcf INTCON T0IF
sardineta said:the correct initialization of a program should be
org 0x00
goto MAIN ;main program
org 0x04
goto ISR ;interruption service routine
MAIN ;main program begin here
blablabla
ISR ;ISR begin here
blablabla
RETFIE
END
I have seen that some people use org 0x05, does anyone know why?
sardineta said:thanks to all, so in other words it is ok, isn't it?
The hex file contains the data as ascii indormation and it also carries address information. This makes the hex file a LOT! larger then the actual code size.
if you want to know how much memory is required you should let the compiler generate a list file, it tells you how much memory is required.
yes you have 1617 program locations left...i have attached the list file, does I have 1671 adresses available?
what about the free flash memory in PIC?
sardineta said:This is what the list file says
Program Memory Words Used: 431
Program Memory Words Free: 1617
I have attached the list file, does I have 1671 adresses available?
what about the free flash memory in PIC?
i cut him a break on his spelling because english isnt his first language :wink:Nigel Goodwin said:sardineta said:This is what the list file says
Program Memory Words Used: 431
Program Memory Words Free: 1617
I have attached the list file, does I have 1671 adresses available?
what about the free flash memory in PIC?
Except for the 'spelling' mistake, you do indeed have 1617 words free.
sorrysardineta said:
sardineta said:Hello.
I found that pin RA4 does not work as a normal output, (I can't read 5 volts) I read the datasheet and it says that as OUTPUT it is open drain, so what you recomment me to do? I am thinking in fixing a resistor of 10k from this pin to Vdd, but correct me if I am wrong, please.
Can I connect the output of an op-amp directly to the RA0/AN0 pin, where I configured it as an input for the ADC?, or I need a resistor from here to VSS.
The pins I am not using from port A and C what do I have to do with them? do them grounded?
sardinetta , how have you wired the op amp inputs?sardineta said:Does the stack has to do with the interrupts I am using?
I hahe vonfigured two interrupts one of them is by using timer0 and the other one is by RB0.
Inside the ISR the program saves the W register and the Status register.
When I have a signal in the input at the op amp it works but when there is no signal I see at the output of the op amp a signal that is different from zero, what can I do to get a 0 volts or gnd while there is no signal at the input of the opamp.
I have realized that when the AN0 (analog input) has no signal it behaves as if it sees a voltage different from zero (ground). because I am changing my point of observations I have a deal with this changes.
This pin RA0/AN0 always should be connected to a voltage point?
thanks
sardineta said:This is the circuit I want to connect to the pic 16F870, at pin RA0/AN0.
The problem as I mentioned above is that when there is no signal I have a DC voltage level at the output.
the gain at output is 1.5
Thanks a lot for your help