Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:32 23 May 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 2 of 2    
Author Message
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 43
Posted: 08:21pm 22 May 2025
Copy link to clipboard 
Print this post

  Volhout said  Hi Allie,

You may have been confused with the different versions.

The " _ " underscore to make the lines longer only works in 6.00.02rc24 (the latest rc). If you are using 5.08.00 then do following:

Run the program
You will get an error
Press F4 (that will open the editor)

Move the cursor to the first character on the "&h001A0015....." line
Press <backspace> on the keyboard

The editor will glue the 2 lines together, but the end of the line is invisible.
You will have a working program now.
You can run it (F2).

I would suggest you save the program
Press F1
Save "quadrature.bas"

You will have saved the program with the glued line, and next time you load it, the problem will not occur.

Volhout
.
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 43
Posted: 08:30pm 22 May 2025
Copy link to clipboard 
Print this post

I did what Volhout said and it seems to work. I have to hook up my cnc x,y,z and rotary table axis encoders to try. May be also modify my MMBasic code to select one of the axis and wait for the input signal.
I'm baby sitting my two great granddaughters twins now so I'll try it later.

Regards Allie
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 43
Posted: 09:03am 23 May 2025
Copy link to clipboard 
Print this post

I put in the input "Select sm0 to sm3";sm  *** command in the main MMBasic code section in the main loop after

                              do

                                a$=inkey$

I not sure if it was before or after a$=inkey$

Now the program is stuck in a loop, asking for the input. I pressed Esc ** no affect.
Then pressed Ctrl and Esc and the program stopped. The next time I ran the program with pressing F2 it went back to the input command asking to input "select sm0 to sm3
it is still in the loop.
How do I reset the picomite with out losing the PIO program. I know you can use one of the pins on the 2040, but I want to make sure I don't lose the PIO program as I had to type all of the code in my self.
I could not get the * copy to clipboard * to work right, the PIO program went into tera term terminal but not right. When I typed it in myself it was O.K.

Regards Allie
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4918
Posted: 09:24am 23 May 2025
Copy link to clipboard 
Print this post

Hi Allie,

When the pico is stuck, <CTRL>-C will stop the program.
Then type SAVE "Quadrature.bas", and the program will be saved on the A:/ drive.
The A:/ drive is flash, so it will remain stored, also without power.

You can disconnect the pico from power, reset it, whatever...

If you need to run the program again:
LOAD "Quadrature.bas"
RUN

Volhout

P.S. I think the program allows you to select a number of quadrature decoders, but just at start. You can not dynamically resize them during run. You select that you need 3, and then that is it. When you stop and RUN again, then you can select 4 (or 2)... But not change while the program is running.
.
Edited 2025-05-23 19:27 by Volhout
PicomiteVGA PETSCII ROBOTS
 
allie
Regular Member

Joined: 06/10/2018
Location: Canada
Posts: 43
Posted: 10:44am 23 May 2025
Copy link to clipboard 
Print this post

I had the picomite disconnected from the laptop and it did end the loop. thank you for the info. I have to go to work now so I'll try to work at it when I come home.

I want to use the RP2040 PicoMite to count the milling machine x,y,and z encoders then

send the count to the color MaxiMite 2 gen 2 which will be the main controller for my milling machine and lath setup.

I thought I could put the MMBasic code in the MMBasic section of the main loop to select which axis to count with an input statement.

Any thoughts on this?

Regards Allie
 
     Page 2 of 2    
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