Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:27 09 Jul 2025 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 : Quadrature multichannel decoder for PicoMite using PIO

     Page 7 of 7    
Author Message
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 10:49am 30 Jun 2025
Copy link to clipboard 
Print this post

The Pico's RP2040 that I have been using, I had to solder the headers on myself, maybe I did some damage to them.
This time I just Up loaded the 6.00.02 firmware to another RP2040 that I bought with the headers already soldered on. I'll program the Quadrature Decoder Program in this unit today and I let you know how this works.

Regards Allie
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2603
Posted: 01:29pm 30 Jun 2025
Copy link to clipboard 
Print this post

Try this from the command line.
> SetPin GP21,GP20,COM2 : Open "com2:115200" As #2
> Print #2, "jumps over the lazy dog" : pause 9 'allow time to transmit
>
Does that also produce an error?
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 09:29am 01 Jul 2025
Copy link to clipboard 
Print this post

  phil99 said  Try this from the command line.
> SetPin GP21,GP20,COM2 : Open "com2:115200" As #2
> Print #2, "jumps over the lazy dog" : pause 9 'allow time to transmit
>
Does that also produce an error?


Still trying to do what you asked. It's not working yet and I have to get ready for work now. I'll try it again later.

Allie
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 09:43am 02 Jul 2025
Copy link to clipboard 
Print this post

  allie said  
  phil99 said  Try this from the command line.
> SetPin GP21,GP20,COM2 : Open "com2:115200" As #2
> Print #2, "jumps over the lazy dog" : pause 9 'allow time to transmit
>
Does that also produce an error?


Still trying to do what you asked. It's not working yet and I have to get ready for work now. I'll try it again later.

Allie


 I put the PicoMite on my Propeller professional development board and tested GP20 AND GP21 PINS FOR INPUT AND OUTPUT with push button for input and led for output.
I checked GP20 for input and output with the DIN and DOUT COMMANDS. I did the same for GP21 and all works good, so it's not a hardware issue. Comms not working is a software issue. I'll work on it the next time I get a chance using phi199's post above.

Regards Allie
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 08:46am 04 Jul 2025
Copy link to clipboard 
Print this post

  allie said  
  allie said  
  phil99 said  Try this from the command line.
> SetPin GP21,GP20,COM2 : Open "com2:115200" As #2
> Print #2, "jumps over the lazy dog" : pause 9 'allow time to transmit
>
Does that also produce an error?


Still trying to do what you asked. It's not working yet and I have to get ready for work now. I'll try it again later.

Allie


 I put the PicoMite on my Propeller professional development board and tested GP20 AND GP21 PINS FOR INPUT AND OUTPUT with push button for input and led for output.
I checked GP20 for input and output with the DIN and DOUT COMMANDS. I did the same for GP21 and all works good, so it doesn't seem to be a hardware issue. Comms not working is a software issue. I'll work on it the next time I get a chance using phi199's post above.

Regards Allie


Yes this also produces the error codes.
I'm going to update the firmware again and this time I'm going to use clear_flash first. Then update the firmware.

regards Allie
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5049
Posted: 11:45am 04 Jul 2025
Copy link to clipboard 
Print this post

Allie,

I am totally confused.

Please update the firmware to the latest, as you planned to do (including clear flash).. Just to make sure nothing is hidden in a library, that you forgot about.

Double check the file name, that there is no word "HDMI" or "VGA" or "USB" in the filename that you put in the board. And make sure to use 2040 with a pico board and 2350 with a pico-2 board.

Then do nothing (no OPTIONS, nothing at all). Just the blank PicoMite install. Connect via USB cable to the pico(-2) using Teraterm or Putty.
Then type (commandline from Teraterm or Putty) above 3 lines.

> setPin gp21,gp20,com2
> open "com2:115200" as #2
> print #2, "jumps over the lazy dog"

Now you have tested only sending text. Not receiving.

Do you get an error ?

When the answer is YES, then type OPTION LIST, and post the text here. Also include a photo of the board you are using in that post, and the error text.

Volhout
Edited 2025-07-04 21:53 by Volhout
PicomiteVGA PETSCII ROBOTS
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 08:39pm 04 Jul 2025
Copy link to clipboard 
Print this post

  Volhout said  Allie,

I am totally confused.

Please update the firmware to the latest, as you planned to do (including clear flash).. Just to make sure nothing is hidden in a library, that you forgot about.

Double check the file name, that there is no word "HDMI" or "VGA" or "USB" in the filename that you put in the board. And make sure to use 2040 with a pico board and 2350 with a pico-2 board.

Then do nothing (no OPTIONS, nothing at all). Just the blank PicoMite install. Connect via USB cable to the pico(-2) using Teraterm or Putty.
Then type (commandline from Teraterm or Putty) above 3 lines.

> setPin gp21,gp20,com2
> open "com2:115200" as #2
> print #2, "jumps over the lazy dog"

Now you have tested only sending text. Not receiving.

Do you get an error ?

When the answer is YES, then type OPTION LIST, and post the text here. Also include a photo of the board you are using in that post, and the error text.

Volhout


I just did the firmware update and then typed in what you said. There is only one error after the commandline. This is what came on the screen

commandline
ERROR : Unknown command
> setpin gp21,gp20,com2
> open "com2:115200" as #2
> print #2, "jumps over the lazy dog"
>

I think it's working. It came back to the prompt (>).

Regards Allie

> pr
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1358
Posted: 09:02pm 04 Jul 2025
Copy link to clipboard 
Print this post

Command line is the prompt. It's not an actual command  
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5049
Posted: 09:08pm 04 Jul 2025
Copy link to clipboard 
Print this post

Each keyboard can have a different key scan of the matrix. What if a key up is detected after the second key down.

In stead of Q down Q up W down W up
It is Q down W down W up Q up

Somethin along these lines.

Volhout
PicomiteVGA PETSCII ROBOTS
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 10:16pm 04 Jul 2025
Copy link to clipboard 
Print this post

  PhenixRising said  Command line is the prompt. It's not an actual command  



Thanks for the help. Can I send the above "jumps over the lazy dog" from COM2 to another COM2 with a different as#((N)1 to 10) on the same MaxiMite, to print it to the screen.

Allie
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 10:31pm 04 Jul 2025
Copy link to clipboard 
Print this post

  Volhout said  Each keyboard can have a different key scan of the matrix. What if a key up is detected after the second key down.

In stead of Q down Q up W down W up
It is Q down W down W up Q up

Somethin along these lines.

Volhout


Thanks for the help getting this set up.
Question : when I hook the PicoMite being powered from the Laptop to the CMM2 GEN2 which is being powered by an adapter, with the COM's TX and RX, I know the grounds also need to be hooked. When I turn one on first will it do damage to the other one. I'm thinking I should put switches on the wires coming from the pins.

Regards Allie
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 10:36pm 04 Jul 2025
Copy link to clipboard 
Print this post

  allie said  
  PhenixRising said  Command line is the prompt. It's not an actual command  



Thanks for the help. Can I send the above "jumps over the lazy dog" from COM2 to another COM2 with a different as#((N)1 to 10) on the same PicoMite, to print it to the screen.

Allie

 
I just changed MaxiMite to PicoMite

Regards Allie
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2603
Posted: 10:40pm 04 Jul 2025
Copy link to clipboard 
Print this post

  Quote  > setpin gp21,gp20,com2
> open "com2:115200" as #2
> print #2, "jumps over the lazy dog"
>

I think it's working. It came back to the prompt (>).
Excellent! It will probably be ok for receive as well but if you want to be sure try this.

Put a jumper from GP20 to GP21 and do the following:-
> setpin gp21,gp20,com2 :open "com2:115200" as #2 :print #2, "jumps over the lazy dog"
> ? loc(#2), input$(255,#2)
25     jumps over the lazy dog

>
If the text gets echoed all is well.

  Quote   I'm thinking I should put switches on the wires coming from the pins.
A 1kΩ resistor in the Rx and Tx lines will provide enough protection.
Edited 2025-07-05 08:47 by phil99
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 10:45pm 04 Jul 2025
Copy link to clipboard 
Print this post

  phil99 said  Try this from the command line.
> SetPin GP21,GP20,COM2 : Open "com2:115200" As #2
> Print #2, "jumps over the lazy dog" : pause 9 'allow time to transmit
>
Does that also produce an error?


I did a new firmware upload to the picomite after doing a clearflash. Then put in the codes you asked me to and it is working.

Thank you for all the help.
Regards Allie
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2603
Posted: 10:51pm 04 Jul 2025
Copy link to clipboard 
Print this post

Good news. See the edit in my post above yours.

Edit
A demonstration of the need to allow time for all characters to be sent.
Tx linked to Rx as before.
> print #2, "jumps over the lazy dog" :pause 3 :? loc(#2), input$(255,#2)
25     jumps over the lazy dog

> print #2, "jumps over the lazy dog" :pause 1 :? loc(#2), input$(255,#2)
13     jumps over the la
>

Edited 2025-07-05 09:02 by phil99
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 88
Posted: 05:25am 05 Jul 2025
Copy link to clipboard 
Print this post

  phil99 said  Good news. See the edit in my post above yours.

Edit
A demonstration of the need to allow time for all characters to be sent.
Tx linked to Rx as before.
> print #2, "jumps over the lazy dog" :pause 3 :? loc(#2), input$(255,#2)
25     jumps over the lazy dog

> print #2, "jumps over the lazy dog" :pause 1 :? loc(#2), input$(255,#2)
13     jumps over the la
>


Thanks again for the above info and the info about the resistors on the TX and RX lines.
So, if the same com port can echo back the sent TX to the RX pin, then I think that one com port can send TX to another com port's RX on the same PicoMite. Am I thinking right.

Regards Allie
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2603
Posted: 05:46am 05 Jul 2025
Copy link to clipboard 
Print this post

  Quote  Am I thinking right.
yes!
 
     Page 7 of 7    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025