See my code below. I can see the generated pulses on my scope.
1. On the Propeller-2 DEV Board I calculate a period of 40 nsec per count in the Smart-Pin pulse/cycle mode. That equals a 25 MHz clock. Is that correct?
2. In this mode, what role does the Y register play? Notes in the V33 docs indicate when it is nonzero, pulses start to appear. Is the Y register a counter that gets decremented at each clock cycle (25 MHz)? Or does the register count the times the X[15:0] count reaches zero? Or does it count something else? Maybe it is not a counter at all and must be set or reset by software. I need an explanation of how to use the Y register to control the number of pulses created in this mode.
3. Does this mode alter any flags? If so, which ones and how? I appreciate the help Forum members have offered to improve the assembly-language documentation. Thank you. --Jon
dirl #20 'Setup Smart-Pin at P20
wrpin PulseConfig, #20 'Set configuration for pulse/cycle
wxpin PulseTiming, #20 'Set overall cycle time and logic-0 period
wypin Cycles, #20 'Send count to Y register
nop 'Delay two clocks for IN to drop
jmp #.myloop 'wait here
PulseConfig long %0000_0000_000_00000_00000000_11_00100_0 'Pulse/cycle output
Cycles long $3A98 'No idea how this value gets used
PulseTiming long $01F4_05DC '40 usec logic-1, 20 usec logic-0