This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

T2 byte overflow in CAN 80C592

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

  • I can't use any interrupts as my Uni has only got the EVAL software...

    Interrupts work just fine in the eval software.

    Jon

  • see reply at philips forum

    Erik

    PS when cross posting, please say you do so

  • *** ERROR L121: IMPROPER FIXUP
    MODULE: binarycode.obj (BINARYCODE)
    SEGMENT: ABSOLUTE
    OFFSET: 006BH
    Program Size: data=24.0 xdata=0 code=519
    Target not created


    Whever I'm trying to use the CM2 interrupt, I get the above error....
    According to what I 've found looking at that error, it shouldn't be happening in Cx51, but only in A51...That's why I figured it's the EVAL's fault...
    What am i doing wrong?

  • Sounds like you're using ROM(SMALL).

    Jon

  • 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