Try this;
You could probably replace the j loops & nops with pauseus x if you knew theCode:i var byte j var byte setfreq var byte PBOUT var PORTB ' my assumption here. have no idea what PBOUT is. TRISB = 0 ' not sure if this is what you need, but.. Main: gosub write_to_chip goto Main write_to_chip: PBOUT = PBOUT | 1 for j = 0 to 10 @ nop next j for i = 0 to 15 lookup i,[1,0,1,1,1,1,1,1,1,1,0,1,0,0,1,0],setfreq if setfreq = 1 then PBOUT = PBOUT | 4 else PBOUT = PBOUT & $FB endif for j = 0 to 10 @ nop next j PBOUT = PBOUT | 0x02; for j = 0 to 10 @ nop next j PBOUT = PBOUT & $FD next i PBOUT = PBOUT & $FE RETURN
time delay required for x.




Bookmarks