Menu

Inspiration from Youtube video "Small basic!"

Winch
2022-02-18
2022-04-03
1 2 3 > >> (Page 1 of 3)
  • Winch

    Winch - 2022-02-18

    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)

     
    • Anobium

      Anobium - 2022-02-18

      This is Evan

      Can you remind me where you found the source? Then, I can look.

       
  • Winch

    Winch - 2022-02-18
     
    • Anobium

      Anobium - 2022-02-18

      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?

       
  • Winch

    Winch - 2022-02-18

    Sorry I don't understand what you mean?

     
  • Winch

    Winch - 2022-02-18

    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.

     
  • Winch

    Winch - 2022-02-18

    I don't know if this sounds familiar to anyone?

     
    • Anobium

      Anobium - 2022-02-18

      yes, you need to install LitDev from the zip.

       
  • Winch

    Winch - 2022-02-18

    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!

     
    • Anobium

      Anobium - 2022-02-18

      Well done. I thought the ZIP file is in the folder structure? so, you dont have to go a hunting for it.

       
  • Winch

    Winch - 2022-02-18

    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?

     
    • Anobium

      Anobium - 2022-02-18

      Download the driver for your OS.
      or, install the IDE for Arduino, then, get the driver sorted, then, uninstall.

       
  • Winch

    Winch - 2022-02-18

    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

     
  • Winch

    Winch - 2022-02-18

    I've also reprogrammed the bootloader. (I often come across as a suggestion) But it didn't help.

     
    • Anobium

      Anobium - 2022-02-18

      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 ?

       
  • Winch

    Winch - 2022-02-18

    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.

     
  • Anobium

    Anobium - 2022-02-18
     
    • Anobium

      Anobium - 2022-02-19

      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.

       
  • Winch

    Winch - 2022-02-19

    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.

     
    • Anobium

      Anobium - 2022-02-19

      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.

       
  • Winch

    Winch - 2022-02-19

    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?

     
    • Anobium

      Anobium - 2022-02-19

      Hook up a cheap USB/TTL converter. I did .... before I threw that board in the bin.

       
  • Winch

    Winch - 2022-02-19

    That's exactly what I'm trying to do now. ;-)
    I'll let you know!

     
  • Winch

    Winch - 2022-02-19

    I can't explain why I'm getting this message now?
    LDCommPort.OpenPort : A non-existent device was specified.

     
  • Winch

    Winch - 2022-02-19

    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.

    #chip mega32u4, 16     'Arduino UNO
    #option Explicit
    
      'USART settings
      #define USART_BAUD_RATE 9600
      #define USART_TX_BLOCKING
    
      dir PORTC.7 out
      HSerPrint "Small BASIC Responder"
    
      repeat 10
    
          PORTC.7 = ! PORTC.7
          wait 50 ms
    
      end Repeat
    
      dim MyString as string
    
      Do Forever
    
         HSerGetString MyString, 1
    
         If MyString = "pin0=on" Then
           Set PORTC.7 On
         End If
         If MyString = "pin0=off" Then
           Set PORTC.7 Off
         End If
    
    
      Loop
    
     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.