[Ktechlab-devel] instruction cycles
David Saxton
david at bluehaze.org
Sat Feb 18 10:29:20 UTC 2006
There was a bug in the oscilloscope which meant it didn't show anything when
zoomed in.
After fixing that though, I tested your example programs, and they behave as
they should (see oscilloscope outputs program1.png, program2.png for the
first and second programs respectively).
On Friday 17 February 2006 14:28, deifo at ono.com wrote:
> Recently I was experimenting with little programs and KTechLab, but
> sometimes strange things happen.
> For example, why is this program producing a perfect square wave in RA4
> output?
>
> loop:
> BSF PORTA, 4
> BCF PORTA,4
> GOTO loop
>
> According to the pic specification, GOTO should take 2 cycles and B?F
> should take only 1 cycle.
>
> To correct this, we must add two NOP's after BSF, is this correct?
> With this little program we should have a perfect square wave on the RA4
> pin.
>
> loop:
> BSF PORTA, 4
> NOP
> NOP
> BCF PORTA,4
> GOTO loop
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: program2.png
Type: image/png
Size: 416 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20060218/ce2a34cb/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: program1.png
Type: image/png
Size: 435 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20060218/ce2a34cb/attachment-0001.png>
More information about the Ktechlab-devel
mailing list