The program (msft_basic_master_program) from Evan Venn returns an error in small basic (unfortunately more errors were found) Cannot find object LDCommPort?
The purpose of this program is to switch an LED on and off, on an Uno board via this program which is written in small basic.
Does anyone know why I am getting this error message? (Don't have much experience with small basic yet)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are the files D:\Great-Cow-BASIC-Library-Development.git\trunk\MicrosoftSmallBASIC\Program_binaries , specially the ZIP, in the same folder as your SmallBASIC application?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But I think I have another problem with Small Basic. I think I need to extend it further with "LitDev" to get extra programming functions in Small Basic. Because the LDCommPort function doesn't show up in the Small Basic menu.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, new problem!
When you use an Arduino Leonardo, the software does not work.
Somehow the com port is not showing up! If you look in Windows device manager you don't see a com port assigned to the Leonardo?
How do you deal with this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've already done this.
But the problem is that I only get to see the com port for a short while after a reset on the board and then it throws it out again.
The board does exactly the same with the Arduino IDE software.
I also notice that many more users have this problem, I just don't see any concrete solutions on the internet at the moment
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have two Leonardo's and both give the same problem.
My windows version is the following: Windows 10 Pro, Version: 21H1,
P.S. Tried a shorter USB cable but no difference.
So, in the Programmers Preferences there is a Programmer called 'Arduino Leonardo/Robot'
This handles the reinsertion (disconnect and reconnect) of these boards. Simply select 'Arduino Leonardo/Robot' as your programmer as reinsert the board.
The architecture of these boards and others like the Micronucleus is to create a USB port for a few seconds which creates a USB/CDC Serial port to permit loading of a new hex. After a few seconds the USB/CDC Serial port gets shut down. So, what you are seeing is as designed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay after trying everything, it was just restart the computer. And now I can use the serial TTL in a normal way.
Then I could continue testing. First connected the USB/TTL to my Uno, this worked fine with the previously written software from small basic.
But then tested the software on the Leonardo and I see no response there. Although I have adapted the software in Great Cow Basic to the correct LED port.
#chipmega32u4, 16'Arduino UNO
#optionExplicit'USART settings
#defineUSART_BAUD_RATE9600
#defineUSART_TX_BLOCKINGdirPORTC.7outHSerPrint"Small BASIC Responder"repeat10PORTC.7=!PORTC.7wait50msendRepeatdimMyStringasstringDoForeverHSerGetStringMyString, 1IfMyString="pin0=on"ThenSetPORTC.7OnEndIfIfMyString="pin0=off"ThenSetPORTC.7OffEndIfLoop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The program (msft_basic_master_program) from Evan Venn returns an error in small basic (unfortunately more errors were found) Cannot find object LDCommPort?
The purpose of this program is to switch an LED on and off, on an Uno board via this program which is written in small basic.
Does anyone know why I am getting this error message? (Don't have much experience with small basic yet)
This is Evan
Can you remind me where you found the source? Then, I can look.
Hi Evan,
I assume you mean this?
https://github.com/Anobium/Great-Cow-BASIC-Library-Development/tree/master/MicrosoftSmallBASIC/Remote_control_of_UNO_LED
Are the files D:\Great-Cow-BASIC-Library-Development.git\trunk\MicrosoftSmallBASIC\Program_binaries , specially the ZIP, in the same folder as your SmallBASIC application?
Sorry I don't understand what you mean?
But I think I have another problem with Small Basic. I think I need to extend it further with "LitDev" to get extra programming functions in Small Basic. Because the LDCommPort function doesn't show up in the Small Basic menu.
I don't know if this sounds familiar to anyone?
yes, you need to install LitDev from the zip.
Yes, Indeed! because now it works!
For those with the same problem, see the link below.
http://litdev.co.uk/
Still, thanks for the help!
Well done. I thought the ZIP file is in the folder structure? so, you dont have to go a hunting for it.
Well, new problem!
When you use an Arduino Leonardo, the software does not work.
Somehow the com port is not showing up! If you look in Windows device manager you don't see a com port assigned to the Leonardo?
How do you deal with this?
Download the driver for your OS.
or, install the IDE for Arduino, then, get the driver sorted, then, uninstall.
I've already done this.
But the problem is that I only get to see the com port for a short while after a reset on the board and then it throws it out again.
The board does exactly the same with the Arduino IDE software.
I also notice that many more users have this problem, I just don't see any concrete solutions on the internet at the moment
I've also reprogrammed the bootloader. (I often come across as a suggestion) But it didn't help.
I am not sure but before the guys can help.... they will need your OS/Patch level/photo of the Board (both sides).
Change the USB cable, short cable next to PC... does that improve ?
I have two Leonardo's and both give the same problem.
My windows version is the following: Windows 10 Pro, Version: 21H1,
P.S. Tried a shorter USB cable but no difference.
see https://www.dfrobot.com/forum/viewtopic.php?t=216
So, in the Programmers Preferences there is a Programmer called 'Arduino Leonardo/Robot'
This handles the reinsertion (disconnect and reconnect) of these boards. Simply select 'Arduino Leonardo/Robot' as your programmer as reinsert the board.
The architecture of these boards and others like the Micronucleus is to create a USB port for a few seconds which creates a USB/CDC Serial port to permit loading of a new hex. After a few seconds the USB/CDC Serial port gets shut down. So, what you are seeing is as designed.
Yes, but does that mean you don't have an option to communicate with this board via USB?
As I was able to do before with the Uno board.
Correct - this board would need a USB implementation for that chip and to my knowledge no one has written one in Great Cow BASIC.
They are different boards. Hence, the Leonardo/Robot is not as popular.
To solve this, do I have to use the TX and the RX of the Leonardo? To get a constant open line with the software on the computer?
Hook up a cheap USB/TTL converter. I did .... before I threw that board in the bin.
That's exactly what I'm trying to do now. ;-)
I'll let you know!
I can't explain why I'm getting this message now?
LDCommPort.OpenPort : A non-existent device was specified.
Okay after trying everything, it was just restart the computer. And now I can use the serial TTL in a normal way.
Then I could continue testing. First connected the USB/TTL to my Uno, this worked fine with the previously written software from small basic.
But then tested the software on the Leonardo and I see no response there. Although I have adapted the software in Great Cow Basic to the correct LED port.