Dave Tweed wrote: >Jan-Erik wrote: >> To someone who have built some project in Olins dev.envir... > >Did anyone ever get back to you on this? Since Olin's on vacation this >week, I suppose I could try to answer your questions... Yes, there was a few replys. >> It uses the /FLAG directive. >> >> This should define some asambler symbols so that you should be >> able to use the bit-instructions easily. Now, whatever I do, >> it always seems as the rellevant symbols (GFL0, GFL1) allways >> starts frorm addres h'00'. I'd expect them to start fro h'20' >> or 'h70' or something. This is verified by looking at the >> actual instructions generated. > >You really shouldn't have to deal with the GFL symbols directly unless >you're doing something really unusual. Well, since I had problems, I was interested in seeing what physical GPR the GFLs was mapped as. I *do* know very well how they are used, this is perfectly clear from a PDF manual I happen to got :-) Now, back to the errors I saw, they are solved. I'm not 100% sure what happend, the only(?) thing that I now is different now, is the order of the tests of the interrupt flags in the main interrupt service routine. So instead of doing this : ; ; Check for UART transmitter ready interrupt. ; dbankif pir1 btfss pir1, txif jump no_uart_xmit gjump uart_intr_xmit ;handle xmit interrupt... no_uart_xmit dbankis pir1 ; dbankif pir1 btfss pir1, tmr1if jump no_tmr1_overflow gjump tmr1_overflow ;handle tmr1 interrupt... no_tmr1_overflow dbankis pir1 I now do this : ; dbankif pir1 btfss pir1, tmr1if jump no_tmr1_overflow gjump tmr1_overflow ;handle tmr1 interrupt... no_tmr1_overflow dbankis pir1 ; ; Check for UART transmitter ready interrupt. ; dbankif pir1 btfss pir1, txif jump no_uart_xmit gjump uart_intr_xmit ;handle xmit interrupt... no_uart_xmit dbankis pir1 (This is in the qqq_intr.aspic file) Tmr1 is setup to interrupt with aprox 400 Hz. The error I saw was that the xmit interrupt routine was called at a high speed, obviously the txif was still set when the global interrupt was re-enabled. I do not *think* I did any changes to the service routine (where txie is disabled). And, lastly, I'm right now looking into using the 18F1220 instead of the 16F628. Cost just a little more, but much easier to program... Jan-Erik. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu