I am new to QB64 and InForm but I cut my teeth in programing with BASIC back in the 80's so QB64 was like a breath of fresh air when I found it last week, especially as I use GCBASIC to program Microcontrollers. The Cherry on top was InForm with which I saw a chance to try my hand at Windows programming.
My test project is to try and create a Windows interface to a Microchip PIC Development board.
The Hardware is WIN7 Pro 64 Bit and a Microchip Xpress 16f18855 development board - talking via USB as COM6:
I have the code working one way with Windows able to control the 4 LED's via Check Boxes RA0..RA3.
But RA5 should reflect the state of the button on the board and is not responding.
The Microcontroller code is working as an attached terminal correctly received the string that InForm should receive.
The Relevant code snippets are:
': External modules: ---------------------------------------------------------------
'$INCLUDE:'InForm\InForm.ui'
'$INCLUDE:'InForm\xp.uitheme'
'$INCLUDE:'QB64_Xpress_Com6.frm'
This is the part that is not working - any suggestions would be welcome.
SUB __UI_BeforeUpdateDisplay
'This event occurs at approximately 30 frames per second.
'You can change the update frequency by calling SetFrameRate DesiredRate%
x = RA5CB.value
x = 0
x = -1
RA5CB.value = x
and back to apparently working code:
'If you set __UI_UnloadSignal = False here you can
'cancel the user's request to close.
PxStr = ""
PxStr = "1"
PxStr = "2"
PxStr = "3"
PxStr = "4"
Everything else is just the Boiler plate code generated by InForm.
Any hints would be appreciated as being a novice at windows programming I have probably made a simple mistake that I am too inexperienced to see.
Thanks for QB64 and InForm, combined with Great Cow BASIC - the language I use to Program Microcontrollers - I can envisage a world of cooperative PC/Controller apps.
Cheers
Chris