Hello I’m new to this form and would like some help…
I’m good with electronics but not so good with programing
I need help converting the following code into basic atom pro 28 pin code it is currently in the form of bs2. I believe that the only differences is the baud rates…
’ ----- Program Description ]---------------------------------------------
’ *** CHECK YOUR WIRING BEFORE POWERING UP THE VFD ***
’ This program demonstrates using the GU112X16G-7003 VFD from Noritake.
’ ----- I/O Definitions ]-------------------------------------------------
VFD PIN 15 ’ VFD Serial I/O Pin
’ ----- Constants ]-------------------------------------------------------
Baud CON 6 ’ 38.4 Kbps (BS2)
’ ----- Variables ]-------------------------------------------------------
index VAR Byte ’ Main Counter Variable
’ ----- Initialization ]--------------------------------------------------
HIGH VFD ’ Initialize I/O Pin
PAUSE 200 ’ Allow Time To Settle
SEROUT VFD, Baud, $1B, $40] ’ Initialize Display
PAUSE 200 ’ Allow Time To Settle
’ ----- Program Code ]----------------------------------------------------
Main:
’ Write Screen Mode Select: 0=Display Screen, 1=All Screen
SEROUT VFD, Baud, $1F, $28, $77, $10, $01]
SEROUT VFD, Baud, $0C] ’ Clear Display
FOR index = 0 TO 98 STEP 7 ’ Move Forward 1 Position
SEROUT VFD, Baud, $0C, $1F, $24, index, 0, 0, 0, DEC2 index]
PAUSE 150
NEXT
FOR index = 98 TO 0 STEP 7 ’ Move Backward 1 Position
SEROUT VFD, Baud, $0C, $1F, $24, index, 0, 1, 0, DEC2 index]
PAUSE 150
NEXT
SEROUT VFD, Baud, $0C] ’ Clear Display
FOR index = 0 TO 98 ’ Move Forward 1 Pixel
SEROUT VFD, Baud, $0B, $1F, $24, index, 0, 0, 0, DEC2 index]
PAUSE 20
NEXT
SEROUT VFD, Baud, $0C]
FOR index = 98 TO 0 ’ Move Backward 1 Pixel
SEROUT VFD, Baud, $0B, $1F, $24, index, 0, 1, 0, DEC2 index]
PAUSE 20
NEXT
SEROUT VFD, Baud, $0C, “Basic Atom”, $0A, $0D, “Microcontrollers”]
PAUSE 1000 ’ Wait 1 Second
SEROUT VFD, Baud, $1F, $28, $61, $11, $02, $20, $20, $06]
PAUSE 6000 ’ Wait For Command To Complete
SEROUT VFD, Baud, $0C] ’ Clear Display
FOR index = 1 TO 8
SEROUT VFD, Baud, $0B, “Brightness Level”, $0A, $0D,
DEC index, $1F, $58, index] ’ Set Brightness Level
PAUSE 500
NEXT
PAUSE 2000 ’ Wait 2 Seconds
SEROUT VFD, Baud, $0C, $1F, $28, $67, $40, $02, $02, “BIG FONT!!!”]
PAUSE 2000 ’ Wait 2 Seconds
SEROUT VFD, Baud, $1F, $28, $61, $10, $04, $00, $50, $00, $04]
PAUSE 2000 ’ Wait 2 Seconds
SEROUT VFD, Baud, $0C, $1F, $28, $67, $40, $01, $01, “Normal…”]
PAUSE 50
STOP
If someone can tell me what i need to change that would be great help