http://www.picbasic.co.uk/forum/showthread.php?t=6221
The page may take awhile to load.....
http://www.picbasic.co.uk/forum/showthread.php?t=6221
The page may take awhile to load.....
Hello;
I'm Ryan form the Philippines I must admit DTS-14 ints rules!!! i'd like to know how can i turn the interrupt on and off for USART continues recepton I'm using PIC16f877a toggling register PIE.5 doesn't seem to work
Thanks
PS.
Part of my project i'm paying my tuition continue college again OSY for sometime now hehe (",)
Check out this post, esp. post 5, http://www.picbasic.co.uk/forum/showthread.php?t=3251
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
you can use
@ INT_ENABLE RX_INT
and
@ INT_DISABLE RX_INT
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
ahhh thanks guys
fixed it toggling both
' CREN = 0
' SPEN = 0
I didn't bother with the interrupts just disabled the Port input thanks I appreciate it!!!
Hi Darrell, I tried to use your great rutines without any luck. I'm using a 18F248 sending CAN messages and I want to use a timer interrupt to send it.
Just to test the rutines I tried to compile the example you post for timer interrupt and DT_INTS-18.bas rutines. But I got some errors on the compilation. Attached you will find a screen shot of what i'm talking about. If anybody can tell me what I'm doing wrong, it will be a great help for me.
Thanks in advance for all yor help
Alfredo
Hi Alfredo,
Well apparently, not all CAN modules are the same.
There are 2 types, CAN and ECAN.
I didn't consider the plain CAN module when I wrote it.
I'll have to make a way for it to detect which module is available and only use the interrupts for it. Then I'll post an update.
But for now, you can just comment out the interrupt Sources that aren't available.
In the DT_INTS-18.bas file, comment out the following lines in the CAN Module section ...Thanks for the info!Code:asm ; -- CAN Module -- ifdef WAKIF ;----{ CAN bus Error }------------------------[PIR3, ERRIF]--- INT_Source CAN_ERR_INT, PIE3,ERRIE, IPR3,ERRIP ;----{ Invalid Received Message }-------------[PIR3, IRXIF]--- INT_Source CAN_IRX_INT, PIE3,IRXIE, IPR3,IRXIP ;----{ Receive Buffer 0 }------Mode 0--------[PIR3, RXB0IF]--- INT_Source CAN_RXB0_INT, PIE3,RXB0IE, IPR3,RXB0IP ;----{ FIFO Watermark }--------Mode 1, 2---[PIR3, FIFOWMIF]--- ; INT_Source CAN_FIFOWM_INT, PIE3,FIFOWMIE, IPR3,FIFOWMIP ;----{ Receive Buffer 1 }------Mode 0--------[PIR3, RXB1IF]--- INT_Source CAN_RXB1_INT, PIE3,RXB1IE, IPR3,RXB1IP ;----{ Any Receive Buffer }----Mode 1, 2-----[PIR3, RXBnIF]--- ; INT_Source CAN_RXBn_INT, PIE3,RXBnIE, IPR3,RXBnIP ;----{ Transmit Buffer 0 }-------------------[PIR3, TXB0IF]--- INT_Source CAN_TXB0_INT, PIE3,TXB0IE, IPR3,TXB0IP ;----{ Transmit Buffer 1 }-------------------[PIR3, TXB1IF]--- INT_Source CAN_TXB1_INT, PIE3,TXB1IE, IPR3,TXB1IP ;----{ Transmit Buffer 2 }-----Mode 0=-------[PIR3, TXB2IF]--- INT_Source CAN_TXB2_INT, PIE3,TXB2IE, IPR3,TXB2IP ;----{ Any Transmit Buffer }---Mode 1, 2-----[PIR3, TXBnIF]--- ; INT_Source CAN_TXBn_INT, PIE3,TXBnIE, IPR3,TXBnIP ;----{ CAN bus Activity Wake-up }-------------[PIR3, WAKIF]--- INT_Source CAN_WAKE_INT, PIE3,WAKIE, IPR3,WAKIP endif list endm list ENDASM
DT
.Damn.. way to slow this time
my solution was..
From p18f8680.inc file...Code:asm RXBnIF=RXB1IF TXBnIF=TXB2IF FIFOWMIF=RXB0IF INT_LIST MACRO INT_Handler TMR1_INT, _ToggleLED1, PBP, yes endm INT_CREATE endasm
On another hand... seems odd...Code:;----- PIR3 Bits ----------------------------------------------------- RXB0IF EQU H'0000' RXB1IF EQU H'0001' TXB0IF EQU H'0002' TXB1IF EQU H'0003' TXB2IF EQU H'0004' ERRIF EQU H'0005' WAKIF EQU H'0006' IRXIF EQU H'0007' FIFOWMIF EQU H'0000' RXBnIF EQU H'0001' TXBnIF EQU H'0004'
Last edited by mister_e; - 30th May 2008 at 23:33.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks