Picomite(VGA) V5.07.07 betas - bug fixes + focus on PIO


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3319
Posted: 11:49pm 13 Jan 2023      

Edit
Ignore, this new Pico has faulty GP0. Does not drive low, just goes high Z. Adding a pull-down resistor enables normal DOUT to work, adequate on PWM. Has 16MB flash yet cost less than regular Pico, now I know why!
On an old Pico it works well.

Playing with the new PWM commands.
PWM channel 0 phase shift seems wrong. This three phase sequence works perfectly if using PWM channels 1,2,3 but not with PWM channels 0,1,2

> LIST
' Three phase motor drive - not quite right

SetPin gp0,pwm  'CH 0a
SetPin gp1,pwm  'CH 0b
SetPin gp2,pwm  'CH 1a
SetPin gp3,pwm  'CH 1b
SetPin gp4,pwm  'CH 2a
SetPin gp5,pwm  'CH 2b

PWM 0, 50, 33.33, -66.66, 1, 1
PWM 1, 50, 33.33, -66.66, 1, 1
PWM 2, 50, 33.33, -66.66, 1, 1

PWM sync 0, 100/3, 200/3
>

> LIST
' Three phase motor drive - perfect

SetPin gp2,pwm  'CH 1a
SetPin gp3,pwm  'CH 1b
SetPin gp4,pwm  'CH 2a
SetPin gp5,pwm  'CH 2b
SetPin gp6,pwm  'CH 3a
SetPin gp7,pwm  'CH 3b

PWM 1, 50, 33.33, -66.66, 1, 1
PWM 2, 50, 33.33, -66.66, 1, 1
PWM 3, 50, 33.33, -66.66, 1, 1

PWM sync 0, 0, 100/3, 200/3
>

Edited 2023-01-14 15:02 by phil99