Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:49 23 May 2026 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 : Stepper Project

     Page 10 of 15    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8842
Posted: 11:58am 13 May 2026
Copy link to clipboard 
Print this post

@ PhenixRising
I'm not saying teardrops are a bad thing, just that what look like teardrops and curved traces in SL6 are no such thing. If they were genuinely part of the trace and couldn't be exploded into bits (usually accidentally) they'd be fine. They may add a touch of reliability but they remove a lot of compatibility and ease of editing.

SL6 isn't a "proper" PCB design package, it's not fair to expect it to work like one.  :)

.
Edited 2026-05-13 21:59 by Mixtel90
Mick

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

Joined: 07/11/2023
Location: United Kingdom
Posts: 1913
Posted: 12:15pm 13 May 2026
Copy link to clipboard 
Print this post

I've decided that I don't like acute angles  

Couldn't believe it; Loaded up a design that I've been working on that has lots of components on it and I only had ONE acute angle  

I wasn't even conscious of this issue  
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8842
Posted: 12:48pm 13 May 2026
Copy link to clipboard 
Print this post

It's usually easy enough to avoid them. I've had occasions when I've used them but got rid of them eventually - mainly because I don't like the look of them. :)  One or two probably get through, but probably no tighter than about 40° when things get a bit too tight for comfort.
Mick

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

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 10:33pm 13 May 2026
Copy link to clipboard 
Print this post

Phill when you mention LCD_DO do you mean the MOSI pin as looking at the pic in the manual of the LCD there is no LCD_DO pin.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3222
Posted: 10:58pm 13 May 2026
Copy link to clipboard 
Print this post

The names of the pins on LCD panels vary a bit. The one required is the LCD Data Out pin, between the backlight and touch clock pins.
I call it LCD_DO to distinguish it from the other Data Out pins for touch and the SD card, T_DO and SD_DO.

It is sometimes labled:-
SDO - Serial data out
DO (MISO) - Data out (Master In Slave Out)
SDO(MISO)

The reason for the diode and resistor is a fault in the ILI9488 chip holds the DO pin low. As all 3 DO pins share the Pico MISO pin if it is directly connected to MISO it prevents touch and the SD card communicating with the Pico.
  manual said  OPTION LCDPANEL ILI9488, OR, DC, RESET, CS [,BL] [,INVERT]
Initialises a TFT display using the ILI9488 controller. This supports 480 * 320 resolution. Note that this
controller has an issue with the LCD_SDO (MISO) pin which interferes with the touch controller. For this display
to work the LCD_SDO pin must not be directly connected to the System SPI MISO.

Edited 2026-05-14 09:11 by phil99
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 11:09pm 13 May 2026
Copy link to clipboard 
Print this post

Ok Phill now I'm confused mate

An ILI9488 requires a diode between LCD_DO and Pico MISO (1N4004 or similar, anode to LCD_DO and cathode to MISO)


So what I see LCD_DO is the MISO pin so which pins on the ILI9488 are used for the Diode, cathode to MISO so which pin is the anode ?
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3222
Posted: 11:22pm 13 May 2026
Copy link to clipboard 
Print this post

Anode connects to LCD_DO, or SDO(MISO) etc. and Cathode (stripe end) to the Pico MISO.
If you are using the same setup as the example in the manual Pico MISO is GP16, which will also connect to T_DO and SD_DO.

Edit.
See here

Also note the 4" IPS ILI9488 is different to most panels. The resistors near the SD socket are 4.7k pull-ups (marked 472), requiring the 10kΩ resistor to be reduced to 1.8kΩ to get it to work.
Edited 2026-05-14 09:35 by phil99
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 03:45am 14 May 2026
Copy link to clipboard 
Print this post

G'Day Guy's well rewired the breadboard back up and found I did need to setup the breadboard power rails which did take some time. Now I did probe test each connection to make sure it was right and did that mod Phill linked above  

Ok on startup the LCD is just backlit and running both the bubbles and with the code on Phill's link the serial did show the lcd outputting data but no action so the spi isn't working it seems.

so thought I would try the SDCard and found this

PicoMite MMBasic RP2350A V6.03.00RC7
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL ILI9488, LANDSCAPE,GP15,GP14,GP13,GP20,INVERT
OPTION TOUCH GP12,GP17
OPTION SDCARD GP21
> b:
> files
B:/
  <DIR>  dtxhelp
11:48 18-02-2012        589  dates.txt
16:10 05-07-2013     108160  DTXHELP.TXT
10:11 19-08-2018       2039  EDITOR.TXT
10:11 19-08-2018        799  FUN1WIRE.BAS
15:15 10-01-2026      16315  Kanmantoo Distilling.docx
10:11 19-08-2018       4798  ONEWIRE.BAS
18:13 18-08-2018   23970870  ruff.bmp
00:00 01-01-2000        640  TEMP.BAS
1 directory, 8 files


So the SDCard is finally working   now why the lcd isn't is still something to find.

Regards Bryan
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 04:16am 14 May 2026
Copy link to clipboard 
Print this post

Well don't what I did   but now it's working   and got the console working also the RTC which just worked.

So after lunch time to setup the Zero and see if I can get the I2C working  
 
mozzie
Guru

Joined: 15/06/2020
Location: Australia
Posts: 331
Posted: 04:19am 14 May 2026
Copy link to clipboard 
Print this post

G'day Bryan,
Quickly tested an ILI9488 3.5" on V6.03.00RC7 and it does work so sorry to say it is something your end.
> option list
PicoMite MMBasic RP2350A V6.03.00RC7
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL CONSOLE
OPTION DISPLAY 40, 40
OPTION LCDPANEL ILI9488, PORTRAIT,GP14,GP13,GP12
OPTION GUI CONTROLS 32
OPTION TOUCH GP15,GP17
GUI CALIBRATE 1, 201, 3970, 851, -1278
OPTION F9 ? MM.answer

I have option LCDPANEL ILI9488,P,GP14,GP13,GP12 for the LCD, you have GP15,GP14,GP13 not sure if this is relevant or just wiring changes.

Also, silly question but you do have both the LCD MOSI and the TOUCH MOSI connected? Been caught out by this before, caused much swearing  

Regards, Lyle.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3222
Posted: 04:23am 14 May 2026
Copy link to clipboard 
Print this post

Does your LCD panel have the 3.3V voltage regulator U1 installed? Some don't, if not it will be bypassed by R0, a 0Ω link.
If you are supplying the panel with 5V the 3.3V chips and SD card will be getting 5V.
That may not be good for them so you will either need to change the supply to 3.3V or remove R0 and add U1.

  Quote  Ok on startup the LCD is just backlit and running both the bubbles and with the code on Phill's link the serial did show the lcd outputting data but no action so the spi isn't working it seems.

When you say the SPI isn't working what do you mean?

At the console, if you type CLS RGB(blue) does the screen go Blue?
If it does type -

? pixel(9,9)

It should return a number between 248 and 255 if data is getting from SDO(MISO) to Pico MISO.

What diode are you using? All 1N400x and a 1N5819 are known to work. Diodes with a low junction capacitance (eg 1N914, 1N4148) may not.
If your panel has 4 x 4.7kΩ resistors (R3, R4, R5 and R8 marked 472) near the SD socket your resistor will need to be 1.8kΩ. Alternatively remove R8 and use up to 10kΩ.

Edit.
Took too long to write all that, so ignore it.
Edited 2026-05-14 14:25 by phil99
 
mozzie
Guru

Joined: 15/06/2020
Location: Australia
Posts: 331
Posted: 04:28am 14 May 2026
Copy link to clipboard 
Print this post

Hi Bryan,
Looks like our posts crossed paths   good to see you sorted it out.

On the subject of limit switches:
Am I correct in thinking you are going to wire 6 limit inputs to the PICO-ZERO and then use 3 outputs from the PICO-ZERO wired to the RP2350 limit inputs, with the I2C interface for software indicators?

Just checking we are on a similar trajectory  

Regards, Lyle.
 
mozzie
Guru

Joined: 15/06/2020
Location: Australia
Posts: 331
Posted: 04:43am 14 May 2026
Copy link to clipboard 
Print this post

G'day,
The Silicon Chip PicoMite Backpack PCB has a link to disconnect the MISO from the ILI9488, most of the time I leave this off with no apparent side effects unless trying to read back from the screen (very rare).

Does anyone know if the GUI system does read back from the LCD?

My own experience says it doesn't so my recommendation would be to simply leave it disconnected and save some headaches. YMMV  

Regards, Lyle.

P.S. I just realized 6 diodes would also work for the LIMIT SWITCH inputs in my previous post and save 3 outputs on the PICO-ZERO  
Edited 2026-05-14 14:47 by mozzie
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 05:34am 14 May 2026
Copy link to clipboard 
Print this post

Ok a bit more info, those resistors on the back of the LCD I took off and bridged the connections, now I did find putting a wire from the Vcc on the LCD to VSYS beside the diode the LCD came to life.

Lyle my thinking is letting the zero handle the limits and E_Stop and when one of them trip send the control value to the master so a I2C interrupt can be called then a routine can stop the stepper and the one tripped will show on the LCD LED.

In turn this will free up 4 in/outs on the master pico so we could have enable pins for all 3 axis's. Like as we talked about before when a limit or E_Stop happens the Z axis needs to raise as quick as possible so the enable for Z will have to be active for this to happen.

Anyway as I am a virgin to I2C   this is going to be a rewarding experience to get going and one reading the manual I can load up that code to get the I2C address of the zero then the fun can start.

Regards Bryan
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 06:20am 14 May 2026
Copy link to clipboard 
Print this post

Ok first bit of fun when I plugged the zero in it didn't show up as a com port so got a new zero out and found the same so did a reboot and found the zero was there so uploads the latest 2040 code and put in the slave code from the manual with no problems.

Now for the master code keep getting this error

[1] SetPin GP10, GP11, i2c2
Error : Pin 14/GP10 is reserved on startup


So tried going setpin GP10, GP11, I2C as I2C is setup and I get this

[1] SetPin GP10, GP11, i2c
Error : Invalid configuration


PicoMite MMBasic RP2350A V6.03.00RC7
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP10,GP11
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL CONSOLE
OPTION DISPLAY 26, 60
OPTION LCDPANEL ILI9488, LANDSCAPE,GP15,GP14,GP13,GP20
OPTION TOUCH GP12,GP17
GUI CALIBRATE 0, 3936, 3895, -1299, -862
OPTION SDCARD GP21


Now looking at the pin assigments

[1] SetPin GP10, GP11, i2c2
Error : Pin 14/GP10 is reserved on startup
> list pins
GP0     1      OFF
GP1     2      OFF
GP2     4      OFF
GP3     5      OFF
GP4     6      OFF
GP5     7      OFF
GP6     9      OFF
GP7     10     OFF
GP8     11     OFF
GP9     12     OFF
GP10    14     Boot Reserved : SYSTEM I2C SDA
GP11    15     Boot Reserved : SYSTEM I2C SCL
GP12    16     Boot Reserved : TOUCH CS
GP13    17     Boot Reserved : LCD CS
GP14    19     Boot Reserved : LCD Reset
GP15    20     Boot Reserved : LCD DC
GP16    21     Boot Reserved : SPI SYSTEM MISO
GP17    22     Boot Reserved : TOUCH IRQ
GP18    24     Boot Reserved : SPI SYSTEM CLK
GP19    25     Boot Reserved : SPI SYSTEM MOSI
GP20    26     Boot Reserved : LCD BACKLIGHT
GP21    27     Boot Reserved : SD CS


The I2C is setup so why won't it let me use it in the code ?
Edited 2026-05-14 16:26 by Bryan1
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11352
Posted: 06:37am 14 May 2026
Copy link to clipboard 
Print this post

If pins are set up as system i2c you don't need to do anything else to use them. No setpin, no open. Just i2c read and write.
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 06:50am 14 May 2026
Copy link to clipboard 
Print this post

Ok here is code from the manual for the master

'setpin GP10, GP11, i2c2
'i2c2 open 100, 1000

for i = 65 to 90
a$ = chr$(i)
i2c2 write &H50, 0, 1, a$
pause 500
i2c read &H50, 0, 8 a$
print a$
pause 500
next i


so commented out the top 2 lines as they are not needed and get this

[5] I2C2 write &H50, 0, 1, a$
Error : Expected a number


So not sure whats going on here as the code is from the pico manual and is letter for letter the same as the manual
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 07:13am 14 May 2026
Copy link to clipboard 
Print this post

Ok with the zero hooked up to the master I2C lines tried a ? time$ as I did set it earlier today and got this

> ? time$
00:15:18


so the battery could be on the way out as it did measure 2.955 volts so I tried a new settime and got this

> rtc settime 2026, 05, 14, 16, 26, 0
Error : RTC not responding


Removed the I2C lines from the zero and got this

> rtc settime 2026, 05, 14, 16, 26, 0
> ? time$
16:26:16
> rtc settime 2026, 05, 14 , 16, 36, 0
>  Disconnected
Connected to COM12 at 115200

> ? time$
16:36:58


As I have said I'm a I2C virgin   so at some stage in life one does have to learn   and for some reason I seem to find the hard way to learn
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3222
Posted: 07:16am 14 May 2026
Copy link to clipboard 
Print this post

I am not sure why that produces an error but can confirm that it does.
The I2C Read line has 2 errors, should be I2C2 and a coma after 8, but it never gets to that error.

However for that example I don't know why a$ is needed in the Write line.

See if this works. Untested.
Clear
Dim a$
for i = 65 to 90
  i2c2 write &H50, 0, 1, i
  pause 500
  i2c2 read &H50, 0, 8, a$
  print a$
  pause 500
next i


Edit.
Posted at the same time.
Because of the error the master was unable to release the I2C bus, so the RTC could not be read.
Edited 2026-05-14 17:20 by phil99
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2002
Posted: 07:45am 14 May 2026
Copy link to clipboard 
Print this post

Thanks for that Phill now it did run but nothing on the console or the LCD and it was just going in a loop.

Now the zero code straight from the manual

SETPIN GP14, GP15, I2C2
I2C2 SLAVE OPEN &H50, tint, rint
do:loop

sub rint
local count, a$
i2c2 slave read 10, a$, count
print left$(a$, count)
end sub

sub tint
local a$ = time$
i2c2 slave write len(a$), a$
end sub


My goal today is getting the I2C going between the pico and the zero so the next visit I can finally load up my gui code and get the interupts happening.
Edited 2026-05-14 17:47 by Bryan1
 
     Page 10 of 15    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026