Hi folks,

Im working on my 18F1320 + 16F88 projekt and ran into the following problem:

The 16F and the 18F are communicating via debug/debugin which works great.
The 18F shows on LCD but has to do the works that needs short reaction time.
Now I tested and found out that following commands(not the complete program)

define osc 20
count PORTB.3,50,X0
a very small calculation here that calculates speed on basis of X0
hpwm PORTB.0 ,speed,2442
debugin [wait"*.*",dec3 RX,RS,TEMP],13,10
LCDout line1
LCDout line2
LCDout line3
IF...THEN routine
LCDout line4

goto main

baud is 19200, the 16F runs 20MHz too

one routine takes up to 0,3 seconds!
I need a complete routine to run in less than 0,1 second otherwise the complete process ist
way too slow for my application.
So I dream to give
the count/HPWM program part a high priority
and the LCDOUT a lower one.
Problem is:
when XO changes, the HPWM signal has to react fast
and not to wait for the program to complete LCDOUT

could I run the count/HPWM thing in an interrupt style and the LCDOUT outside the interrupt thingy?
I guess the "debugin [wait....]" line slows it down too much

I appreciate your help