The Puma
Joined: 23 Apr 2004 Posts: 227 Location: The Netherlands
|
Convert from PBASIC 2.5 to CCS-C |
Posted: Sun Mar 12, 2006 10:17 am |
|
|
I need some help with converting from PBASIC
with CCS-C command (procedure) can i used to convert the SHIFTOUT command to CCS C
Code: | ' ==================================================================
' HCMS-2900 SETUP SUBROUTINE
' ==================================================================
DSPreset:
LOW DSP_CS ' Activate the Display.
HIGH DSP_BLANK ' Not necessary but clear
LOW DSP_RESET ' RESET.
PAUSE 5
HIGH DSP_RESET ' Normal Display is now sleeping
' clear all the dots
LOW DSP_RS ' Select DOT register
FOR temp=1 TO 40 ' 5 bytes/char * 8 char
SHIFTOUT DATA_,CLK,MSBFIRST,[0\8] ' Send All Blanks for each COL.
NEXT
HIGH DSP_CS ' Copy data to dot latch step 1.
LOW CLK ' Copy data to dot latch step 2.
' next step the 2 control registers start with the first
HIGH DSP_RS ' select the Control Register
LOW DSP_CS ' Activate the Display again.
SHIFTOUT DATA_,CLK,MSBFIRST,[DSP_CONTROL_0] ' Send Data bits.
HIGH DSP_CS ' Copy data to control latch step 1.
LOW CLK ' Copy data to control latch step 2.
' Now the 2nd control register
HIGH DSP_RS ' select the Control Register
LOW DSP_CS ' Activate the Display again.
SHIFTOUT DATA_,CLK,MSBFIRST,[DSP_CONTROL_1] ' Send Data bits.
HIGH DSP_CS ' Copy data to control latch step 1.
LOW CLK ' Copy data to control latch step 2.
LOW DSP_BLANK 'Show what is in the DOT registers NOTHING!
RETURN ' Return to program.
|
|
|