Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:00 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : using a macbook pro

     Page 2 of 3    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9124
Posted: 03:23pm 19 Sep 2023
Copy link to clipboard 
Print this post

  Quote  I've never come across a downloaded file running immediately without user intervention.


The OP is just listing the file to the PicoMite without AUTOSAVE. If you do this it executes each line as it receives it, normally to no useful effect.

You must use AUTOSAVE or XMODEM on the Pico to get a file permanently into the device
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 03:52pm 19 Sep 2023
Copy link to clipboard 
Print this post

That never dawned on me...  :)

Yes, he's seeing what a fast typist would see if the PicoMite was in command mode. Of course there's no file in memory.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 04:26pm 19 Sep 2023
Copy link to clipboard 
Print this post

  macmite said  I upload a file from my Mac to the pico using Serial.app in VT100 emulation mode.
It is immediately is executed.

You either want to be in EDIT or use TFTP / XMODEM to get the file across.

(Or if there's an SD card you could write the file on there on your PC before putting the SD card into the Pico.)

John
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 05:22pm 19 Sep 2023
Copy link to clipboard 
Print this post

a bit of success---thanks
Two simple .bas files one Prints 1-20 the 2nd 1-21
yes the pico needs the xmodem receive cmd and the Serial.app emulating VT100 needs the Xmodem option.
Then it transfers the selected file from the Mac. It does not execute on transfer now.
The cmd NEW also seems/is necessary after each transfer.

What does the "Error : Invalid character: 2" mean?

> files
files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2000          4  bootcount
00:21 01-01-2000          0  lcd_picomite.bas
2 directories, 2 files, 712704 bytes free
> xmodem receive
xmodem receive
Saved 95 bytes
> save "A:/picotest1.bas"
save "A:/picotest1.bas"
> list
list

For a = 1 To 20 : Print a; : Next a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> run
run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[3] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Error : Invalid character: 2
> files
files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2000          4  bootcount
00:21 01-01-2000          0  lcd_picomite.bas
00:01 01-01-2000         91  picotest1.bas
2 directories, 3 files, 712704 bytes free
> new
new
> xmodem receive
xmodem receive
Saved 98 bytes
> run
run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
[3] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Error : Invalid character: 2
> save "A:/picotest2.bas"
save "A:/picotest2.bas"
> files
files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2000          4  bootcount
00:21 01-01-2000          0  lcd_picomite.bas
00:01 01-01-2000         91  picotest1.bas
00:04 01-01-2000         94  picotest2.bas
2 directories, 4 files, 712704 bytes free
>
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 05:35pm 19 Sep 2023
Copy link to clipboard 
Print this post

  macmite said  What does the "Error : Invalid character: 2" mean?

> files
files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2000          4  bootcount
00:21 01-01-2000          0  lcd_picomite.bas
2 directories, 2 files, 712704 bytes free
> xmodem receive
xmodem receive
Saved 95 bytes
> save "A:/picotest1.bas"
save "A:/picotest1.bas"
> list
list

For a = 1 To 20 : Print a; : Next a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> run
run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[3] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Error : Invalid character: 2


At a guess something (on the Mac?) is echoing back to the Pico.

So, the output 1 2 3 (etc) looks like a line number of 1 followed by an invalid character (the 2).

You can probably check you get the same error if you type in (not in EDIT) the line
1 2 3 (etc - stop when you get bored)

John
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 09:30pm 19 Sep 2023
Copy link to clipboard 
Print this post

> list
list

For a = 1 To 20 : Print a; : Next a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> run
run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[3] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Error : Invalid character: 2

Assuming the "list" is echoed, the rest of the printout up to the '>' suggests that the program uploaded to the mite includes the line:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

as it's third line.
That would explain the error on line [3].

I know nothing about mac's and don't want to know anything but a simple terminal should work the same as any other terminal.

XMODEM to get a file directly into the flash drive or AUTOSAVE followed by SAVE would be a preferred method for BAS programs.

If all else fails, install a SDcard and do the swap method.

Jim
VK7JH
MMedit   MMBasic Help
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 11:44pm 19 Sep 2023
Copy link to clipboard 
Print this post

Hi macmite

Which part of this post

https://www.thebackshed.com/forum/ViewTopic.php?TID=14948&P=1#209687

And the thereof following post is unclear or not working for you?

I’m using a Mid 2012 MacBook Pro to successfully program a Webmite using the technique  I have  described in these two posts.

Please feel free to ask any questions of clarity.
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 05:42am 20 Sep 2023
Copy link to clipboard 
Print this post

Hi
JohnS, TassyJim you are correct about a 2nd program line 1-20 causing the error.

The recent MacOS (I am using 12.6.9) does not directly support Xmodem now, it has been removed. Hence the need to use a program like Serial.app which includes the Xmodem protocol.
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 02:11pm 30 Sep 2023
Copy link to clipboard 
Print this post

Hi,
I have copied the Aug 2023 SC program retic.bas to a RP2040 pico W. It auto starts and I browse the web page--all good.

How do I stop the retic.bas program running without disconnecting?

I can telnet into the pico W and I get
mack@macmini2018 ~ % telnet 192.168.100.176 23
Trying 192.168.100.176...
Connected to webmite.fritz.box.
Escape character is '^]'.

telnet> files
?Invalid command
telnet> ^[[B
?Invalid command
telnet> stop
?Invalid command
telnet> quit
Connection closed.
mack@macmini2018 ~ % telnet 192.168.100.176 23
Trying 192.168.100.176...
Connected to webmite.fritz.box.
Escape character is '^]'.

telnet>
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 02:20pm 30 Sep 2023
Copy link to clipboard 
Print this post

Hi
All good now.
At first I was powering the pico W from my Mac usb.
Now I am powering the pico W from an external power supply.
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 03:35pm 30 Sep 2023
Copy link to clipboard 
Print this post

Hi,
I have been able to drive a 16x2 LCD on a RP2040 pico using I2C sda=GP0 and scl=GP1
using the code posted by G8JCF on 7/7/2014
Note his code omitted the line
SETPIN sda, scl, I2C

When I try to power up my RP2040 pico W with no auto starting program installed it will not boot up when the SCL from the LCD is connected.

Both the SDA and SCL connections are via 5V/3.3V level shifter

I have tried several of the I2C pins ie GP16,17 GP0,1 GP20,21 same result
As soon as I connect the SCL the pico W freezes. Why?

There is no code loaded yet, just the Webmite and some of the retic,bas files in the A dir.
The LIST cmd shows nothing loaded.

Something is different between the pico and pico W.
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 05:35pm 30 Sep 2023
Copy link to clipboard 
Print this post

Maybe you need pull up resistors on the i2c lines? Some displays come with them some not. Have you tried running the LCD display off 3.3V on the SCA and SCL pins and separate 5V for the backlight through a suitable resistor?
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9124
Posted: 06:32pm 30 Sep 2023
Copy link to clipboard 
Print this post

  Quote  When I try to power up my RP2040 pico W with no auto starting program installed it will not boot up when the SCL from the LCD is connected.


Something is badly wrong electrically. Have you got the level convertor backwards? Check all wiring. I2C is an open collector standard and unless there something wrong it shouldn't affect booting in any way
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 01:00am 01 Oct 2023
Copy link to clipboard 
Print this post

The wiring is correct and the LCD and pico all work fine but the same arrangement on the pico W does not.
There are no external pullup resistors used.

The LCD is powered from the pico W VBUS and the level shifter HV from VSYS which is about 0.5V lower than VBUS but this arrangement works OK on the pico.

I have some electrical options to test.
I will try swapping the VBUS and VSYS. Or using only VBUS for the LCD and the level shifter HV.
I also have a 3.3V LCD 16x2 which will not require a level shifter.
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 04:06am 01 Oct 2023
Copy link to clipboard 
Print this post

Hi,
All working now. Wiring error.
I had used the 3.3VEN for the LV on the level shifter.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 07:55am 01 Oct 2023
Copy link to clipboard 
Print this post

Reading through this thread, I just want to thank you, macmite, for sticking with it.

We have had a few new members here, that at the first sign of something not working as THEY expect, they blame it on the MM, and call the whole dev crap, and then leave in a huff - or are banned.

So, thank you for persevering, and I hope you will enjoy your MM experience.  
Smoke makes things work. When the smoke gets out, it stops!
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 02:41am 02 Oct 2023
Copy link to clipboard 
Print this post

Hi,
Yes sometimes you need patience but it helps a lot when there are others to ask.
I built my first hobby electronic device in 1963. A one valve R/C Rx and Tx for a model boat. I started with Arduino (MacOS) about 10yr ago. A lot has happened with electronics in that time but we still don't know what's inside an electron.

I am still unable to transfer a file from RP2040 pico to my Mac destop using Serial with Xmodem protocol. It works Mac to pico.
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 03:43am 02 Oct 2023
Copy link to clipboard 
Print this post

  macmite said  I am still unable to transfer a file from RP2040 pico to my Mac destop using Serial with Xmodem protocol. It works Mac to pico.


if you were feeling brave, you could try compiling GFXterm for your mac:
https://github.com/robert-rozee/GFXterm

it is written using Lazarus/FPC, which are free software. i would be happy to offer any help i can, although i am not a mac person.


cheers,
rob   :-)
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 08:50am 02 Oct 2023
Copy link to clipboard 
Print this post

Here is another simple question.
I have used the screen cmd in iTerm2 to connect to a RP2040 pico and have the >prompt.
I now want to disconnect from the pico, what is the cmd?

Is there a >prompt cmd?
In iTerm2 there is the cmd Menu Session, Restart Session which quits the >prompt and returns to the -zsh % prompt for the mac.
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 07:28am 04 Oct 2023
Copy link to clipboard 
Print this post

I am logged into the pico W using Terminal running telnet (MacOS 12.6.9 with telnet installed with homebrew).
I run a prog.bas, it errors, I enter edit, I attempt to navigate to the error and after a few seconds or minutes the edit window locks and then the telnet session terminates.
The wifi router shows the pico W connections as idle.

I can log back in immediately.
Other devices on my home net using the wifi router remain connected.
Sometimes it locks after F1, other times while navigating/editing the program.
The file is about 52K bytes
At the > the cmd > PRINT MM.INFO(WIFI STATUS) returns 1 after reconnecting.

Is there a cmd to get the wifi connection parameters in particular the signal strength?
 
     Page 2 of 3    
Print this page
© JAQ Software 2024