Hi, Info: target 18c452, dev platform ICE2000 ( PCM18XA0 ) Tried to be a bit clever when using an MAX3100 uart and to avoid doubling the code for tx'ing the first char. = ( i.e. when 'idle' the uart has rx and tx irq generation enabled but to generate the first irq condition for the first byte when putting a block into the tx-buffer, it had to be sent to the uart = *outside* the normal tx irq handler. ) But instead of actually sending the first byte outside the isr I thought of a way to let the s/w trigger the first irq and then = let the normal tx-buffer handler pass it over. So I tried something like this: BCF INTCON,GIE,A ; disable global interrupts NOP BSF INTCON3,INT1IF,A ; max 3100 connected to int1 pin, trigger it NOP BSF INTCON,GIE,A ; enable global interrupts = But to my surprise this didn't work, I can clearly see the bit is set in INTCON3 ( bit 0 in this case ) however the isr is never triggered after the BSF GIE line. Odd ? However this does work: BSF INTCON3,INT1IF,A ; max 3100 connected to int1 pin, trigger it =2E. why is that ? i.e. setting the irq flag without disabling gie works but not when it's disabled ? = I've been lead to belive, due to the datasheets that *any* interrupt flag that is set when enabling the global irq will trigger the interrupt, hence the warning in the datasheets 'make sure the appropiate int flag is cleared prior to enabling global interrupt' but it sure doesn't seem like it, anyone can spot where my thoughts wandered ? /Tony Tony K=FCbek, Flintab AB = =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2 E-mail: tony.kubek@flintab.com =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2 -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads