3 ms·
You can do it in one fewer clock cycle per loop by just using the register instead of the extra scratch memory space :) (I also reset the loop at the end or it
by ketralnis 11y ago
You can do it in one fewer clock cycle per loop by just using the register instead of the extra scratch memory space :) (I also reset the loop at the end or it would be two fewer):
RAM AD PC
ADDR ________ _ _
---- |---*****|-|*| ; OUTPUT the register
---* |-*-*-*--|-|-| ; IF MAX, goto LBL_RESET
--*- |--*--**-|-|-| ; else add ONE to the register...
--** |-*------|-|-| ; ...and start over.
-*-- |-----***|-|-| ; LBL RESET: read in ZERO to the register...
-*-* |-*------|-|-| ; ...and start over.
-**- |-------*|-|-| ; ONE (r/o data)
-*** |--------|-|-| ; ZERO (r/o data)
- daveloyall 11y agoOh! Yes, that's totally what registers are for, huh? :) Thank you.