Hi,
I am implementing one wire protocol for controller. The controller has Single wire (BKGD pin) and is connected to the Tx1 processor.
To send bit 0 to the controller, need to follow the scheme below.
BDM = 0;
asm LDD #TC13; asm DBNE D,*+0; // 3.25us @ 50 MHz (13 TC @ 4MHz BDM clk)
BDM = 1;
asm LDD #TC4; asm DBNE D,*+0;// 1.00us @ 50 MHz ( 4 TC @ 4MHz BDM clk)
BDM is nothing but the Single wire connected to the processor Tx1. And TC13 represents 13 Target clocks. The controller has their own proprietary instruction set and core. While porting code to Tx1 processor unable to identify the asm statements (compilation errors).
The asm statement in the above snippet shows, it is loading TC13(macro value 36) into the accumulator and waiting for accumulator to become 0 by decrementing it. So that it can execution of that statement takes 13 Clock pulses.
I want to generate some delay in terms of target clocks. Could you please share assembly instruction which can be used to generate delay. Here target clock is 6.25 MHz.
Thanks in advance, please correct me if i am wrong.