I need a fast ADC conversion and T2 16-bit overflow is not a fast enough source for me... I can't use any interrupts as my Uni has only got the EVAL software... Any suggestions how I can use byte overflow without any interrupts? Giannis
You were right.... I did't know I couldn't use small... Any way, thanx for your tip... Giannis
ROM(SMALL) directs the compiler to use AJMP and ACALL instructions for all function references. Even for the interrupt vectors. The problem with the evaluation software is that it locates program code above 0x800. Therefore, an ACALL will fail (since the target is in a different page). The default tool options are the BEST settings for MOST applications. Jon
I have one more question about T2 and Compare function: I want to use the toggle output of Port 4.7 when matching of CM2 and T2 occurs... Normally this happens every 2^16 cycles i.e every 65536 machine cycles, when the 16-bit T2 counter overflows.. I want the toggle to occure evey 2^8 i.e every 256 cycles when the lower byte overflows, with this rate being constant... I tried to do that by enabling the T2 Comparator2 interrupt, setting CML2 (lower byte of CM2)to 0xff, and adding to it 0xff in every ISR... It doesn't work... Should I try instead using the byte overflow option?My problem is that i can't reset T2 after every interrupt..How can I make this toggling rate constant? Any suggestions will welcomed cause my mind is stacked after long hours... Cheers Giannis