can the 08M2 use Hsersetup / Hserin in conjunction with terminal sertxd?

tschrama

New Member
Hi all,

Still working on my Midi receiver and changed my platform to the 08M2 .. it seems I cann't use Hsersetup / Hserin in conjunction with terminal sertxd. Is that right?
 

AllyCat

Senior Member
Hi,

HSEROUT and SERTXD use the same pin (Leg7), so trying to use both in the same program is likely to give problems. However, using HSERIN and SERTXD should be possible; set bit3 (disable hserout) in the mode byte of HSERSETUP to give "normal i/o".

Alternatively, you may be able to "swap" the HSEROUT pin to Leg 3 by using the base PIC's APFCON (Alternate Pin Function CONtrol) Special Function Register. That might allow you to use both SERTXD and HSEROUT at the same time.

Cheers, Alan.
 

tschrama

New Member
Thanks.. I have no need for Hserout.

HSerSetup B31250_4, %0001

gives me an error message:

HSerSetup B31250_4, %0001
^
Syntax error on line 16 at/before position 25

Error: Background hserin (bit0 = 1) not supported by this chip!
 

tschrama

New Member
My bad.... should be "HSerSetup B31250_4, %1000" .... it's working now!!

big thanks!
 
Last edited:
Top