Buzby
Senior Member
I just thought I'd try writing code to test some of the ideas in Marty's DMD thread.
I'm without real chips at the moment so I can only run in the simulator. My simulated hardware is 28X2
The code snippet below is the basis of the DMD refresh.
It will send 512 bytes from the scratchpad out over the HSPI, in 32 groups of 16 bytes.
The problem is 'ptr' does not seem to increment properly.
After executing HSPIOUT the pointer should have incremented 16 times, but it only increments once.
Is this a bug, or am I doing something wrong ?.
Cheers,
Buzby
I'm without real chips at the moment so I can only run in the simulator. My simulated hardware is 28X2
The code snippet below is the basis of the DMD refresh.
It will send 512 bytes from the scratchpad out over the HSPI, in 32 groups of 16 bytes.
Code:
' Refresh the DMD display
ptr = FrameStart ' Set scratchpad pointer to current frame start address, 0 or 512
For Row = 0 to 31
' #
' #### Put DMD control stuff here
' #
HSPIOUT (@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc,@ptrinc)
' #
' #### Put DMD control stuff here
' #
Next Row
After executing HSPIOUT the pointer should have incremented 16 times, but it only increments once.
Is this a bug, or am I doing something wrong ?.
Cheers,
Buzby