The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21246 Location: Chicago, IL |
Posted: Thu Jul 08, 2010 12:54 pm Post subject: |
|
|
S3C8:
The calls to the $0161 vector set the mid-frame burst to the following settings, then it jumps to the regular engine.
ON: from the ONE pair
OFF: from the leadin pair.
The alternative is to set bit3 in W7 (ie, BITS W7.3) and then call $0146. In this case, the mid-frame burst will be a repeat of the leadin pair.
But, you can customize the mid-frame pair by loading the timing data into RD0/RD1(on time) and RD2/RD3(off time).
So, the code would be:
BITS W7.3
ld w0, #D0h
ld @w0,pd10
inc w0
ld @w0,pd11
inc w0
ld @w0,pd04
inc w0
ld @w0,pd05
JP 0146h
If the 4 bytes of timing data are sequential, you could also do this to set up RD0:
LD W0,#1Eh ;set FROM register to R1E (leadin times)
LD W1,#D0h ;set TO register to RD0 (mid-frame burst)
LD W2,#04h ;set #bytes to 4
CALL 015Bh ;copy 4 bytes from R1E to RD0 (mid-frame burst)
BITS W7.3 ;turn on mid-frame burst
LD R25,#19h ;set mid-frame burst position to 25
CALL 0146h ;send signal
HCS08:
Here, the following code is used to create a normal mid-frame burst:
MOV #$09, $7D
JMP $FF7A
So, here's what the HCS08 version of the custom code would be:
MOV #$09, $7D
BSET 3,$AB
LDHX pd10 (where pd10 is the custom ON time)
STHX $9A
LDHX pd04 (and pd04 is the custom OFF time)
STHX $9C
JMP $FF5F _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|