Posts: 65
Registered: ‎11-19-2002

SW UART: F000 IE7 -> F310 CP0/1

Hi, I'm trying to convert the AN015 Software UART Example 2 (the ASM Version) from F000 to F310.
The Example uses the IE7 (PRT1IF.7) as emulation of the HW SE-interrupt. The F310 has no IE7...
So my idea: using a CP (0 or 1) as IR-trigger. May I use these CP pin with a week pull up and can I pull down this pin from program and it will then trigger a CP IR? Then I could do the same functions as in the example (I hope)

THX and bye from Germany

Bye from GermanyWolfgang Allinger
Posts: 65
Registered: ‎11-19-2002

Re: SW UART: F000 IE7 -> F310 CP0/1

I found a result:
The Comparator (I used CP1) IR-req can be set by SW, there is no I/O pin needed. So it will function like the IE7 example from F000 with the Rising and/or Falling Edge IRrequest. In other words I set CP1FIF=CPT1CN.4=1 (orl CPT1CN,#0001000b) after enabling the IRsys... and this will trigger an IR on vector 06Bh.

ATTENTION, the description of the CPTxMD reg ist wrong.
CPIxRIE CPxFIE = 1 enables the IR and didn't disable it, as written on pg.56 & 59 in manual DS009-1.2 AUG02

Bye from Germany
Wolfgang Allinger
Bye from GermanyWolfgang Allinger