New at many things, but learning
hi all,
Using 18f4550....
I tried it on INT_INT -- INT External Interrupt and RBC_INT -- RB Port Change Interrupt. It works wonderfully.
At this point, I want to use TX_INT -- USART Transmit Interrupt.But I could
not manage it out.My code is
ADCON1 = %00001111
TRISC = %10000000
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
RCIF VAR PIR1.5
TXIF VAR PIR1.4
DATA var Byte
Pause 5
Main:
If RCIF then hserin[data]
goto Main
which definitions do I need ?Many thanks
Regards
New at many things, but learning
define LOADER_USED 1
define OSC 20
DEFINE RESET_ORG 800H
data var byte
ADCON1 = %00001111
TRISC = %10000000
DEFINE HSER_RCSTA 90h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
INCLUDE "DT_INTS-18.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler RX_INT, _recieve, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
@ INT_ENABLE RX_INT ; enable Timer 1 interrupts
RCIF VAR PIR1.5
Main:
PAUSE 10
GOTO Main
DISABLE DEBUG
'---[RC- interrupt handler]--------------------------------------------------
recieve:
hserin [data]
@ INT_RETURN
ENABLE DEBUG
ok, I removed the definitions related to TX. can I get rid of other definitions?
Multiple measurements with Instant Interrupts.
Hi Darrel,
some days ago, I was trying to measure the "ON time" of my carīs gasoline injectors (one of the 4)
Iīm using a 16F877 @ 10 Mhz, and Iīm using the Timer0 as a 250 ms counter and Timer1 as a pulse counter, I ran out of possibilities of new measurements.
Bruce told me that I should use a new device with more timers available, like the 18F4431 (or similar).
The problem is : This device (or similar) is not available here in Brazil, and Microchip do not send samples to Brazil.
I was reading this post about the interrupts and decided to ask :
Is that possible to read the pulses on Timer1 on a fixed time interval (so, I would have the carīs speed and the mileage) and measure the injector on-time (so I would have the consumption) with the instat interrupts running on a 16f877 ?
Thanks !
Sergio
Instant Interrupt & EEprom
Hi,
how i use the instant interrupt (very nice pice of code) and the write or eeprom comand. In the manual they say to turn off all interrupts. Or is there no problem to use them together?
Many Thx for reply