USART, I2C, EERAM read/write, port setup, ISR, and full initialization sample from Tony Kübek of Flintab AB [tony.kubek at flintab.com]
JAL Interrupts@, Ubicom SX Interrupts@,
hello....i wrote a normal interrupt routine for pic18f452.But it doesn't seem to work.Is there any problem with my save and restore context?Can any one help?Thx
in_serv: MOVWF W_SAVE ; save W SWAPF STATUS, W ; save STATUS MOVWF STATUS_SAVE uart_ready btfss PIR1,RCIF ;; 5 goto Main ;if not ready, wait... movf RCREG,W ;recover uart data bsf LATB,3 ;light RB3 led movwf rx_data ;save for later bsf INTCON,7 ;re-enable interrupts SWAPF STATUS_SAVE, W MOVWF STATUS ; restore W and STATUS SWAPF W_SAVE, F SWAPF W_SAVE, W retfie
How can I save the data memory bank during a interruption if I'm using a 16f873 that does not have the registers mirrowed in the upper memory. Thanks Matteo
You can't save the entire data memory bank to somewhere else, because there is nowhere else.
However, you can save away the bits that indicate which data memory bank is the "current" data memory bank. (The BANKSEL command sets those bits). Those bits are in the "status" register.
Hi I am having trouble geting the interrupts working for the PIC16f628. It seems to go to the interrupt once only. i tried checking the toie flag, as it should toggle between 1 and 0, but it does. Any ideas anyone??? Thanks, Charlene
Are you sure the global interrupt enable bit is "enabled"?
Does the interrupt routine end with RETFIE (return from interrupt) ? (Ending an interrupt routine with a "normal" RETURN or GOTO doesn't work -- those would cause the "only interrupts once" problem). -- David Cary 2005-12-31
|file: /Techref/microchip/ints.htm, 5KB, , updated: 2018/9/4 13:41, local time: 2021/4/15 04:04,
|©2021 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.piclist.com/techref/microchip/ints.htm"> PIC MicroController, PIC Interrupt Routine Library</A>
|Did you find what you needed?|
PICList 2021 contributors:
o List host: MIT, Site host massmind.org, Top posters @20210415 Harold Hallikainen, RussellMc, Neil, Bob Blick, Alan Pearce, Spehro Pefhany, Clint Jay, Jason White, Richard Prosser, Alexandre Guimaraes,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!