Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 05:39 05 May 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 : PicoMite Alpha Firmware

     Page 12 of 17    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 01:27pm 08 Jun 2021
Copy link to clipboard 
Print this post

Please stop posting pictures of "stuff" with "blinkenlights" my self-control is very low at the moment

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 01:42pm 08 Jun 2021
Copy link to clipboard 
Print this post

Interesting. Does this suggest that with the ESP-01 socket, GP16 (UART0TX) may be Com1:Tx and GP17  (UART0RX) may be Com1:Rx? Or maybe COM2. I understand that it is all configurable, but for those who want it, some predictability could be useful, and actual hardware tends to lock in some choices.

Regarding the audio on GP18 & GP19, is or can this be DAC-like?

Will your implementation (or tests of it) use the GROVE # layout for I2C and the additional COM port?

I note no provision without flying wires for ILI9341, ILI9486, ILI9488, etc.

~
Edited 2021-06-08 23:45 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 01:58pm 08 Jun 2021
Copy link to clipboard 
Print this post

ooohhhh.....  that's rather nice...

PicoPorn!

It's no good, Tom, you can't fight it. You will be assimilated. :)
Mick

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

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 05:10pm 08 Jun 2021
Copy link to clipboard 
Print this post

  CaptainBoing said  
  matherp said  a21

setpin 19,spi1sck
setpin 20,spi1tx
setpin 16,api1rx
spi1 open 1000000,0
? spi1(123)



Tx/Rx are confusing because they are subjective. SPI uses MOSI/MISO which leaves no doubt

setpin 20,SPI1MOSI
setpin 16,SPI1MISO

is much better IMO

I am glad the hard CS has been dispensed-with

my 2p


I wondered why MOSI/MISO hadn't been used too. Apparently Raspberry Pi chose Tx/Rx because the Pico can be either a master or a slave device and the terms change depending on which it is.
Mick

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

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 05:22pm 08 Jun 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  I wondered why MOSI/MISO hadn't been used too. Apparently Raspberry Pi chose Tx/Rx because the Pico can be either a master or a slave device and the terms change depending on which it is.


It may also be because, however innocuously widespread in the tech world, the use of "slave" is now broadly deprecated.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 05:24pm 08 Jun 2021
Copy link to clipboard 
Print this post

Is there a reason why with LOAD fn,r fn must be a literal string and not a string variable?

> load "hello.bas"
> list
Print "Hello, World"
> load "hello.bas",r
Hello, World
> fn$="hello.bas"
> load fn$,r
Error : Could not find the file
>

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3558
Posted: 07:53am 09 Jun 2021
Copy link to clipboard 
Print this post

@Peter

Is there a possibility (memory wise) to add MATH FFT ?

The NAME command is in fact a RENAME. Why not use rename ? legacy ?

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 09:21am 09 Jun 2021
Copy link to clipboard 
Print this post

a23


PicomiteV5.07.00a23.zip

Big internal changes
NAME changed to RENAME
MATH FFT should now work - needs testing
new command :   COPY fname1$ to fname2$
PAUSE command improved
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 09:21am 09 Jun 2021
Copy link to clipboard 
Print this post

a23


PicomiteV5.07.00a23.zip

Big internal changes
NAME changed to RENAME
MATH FFT should now work - needs testing
new command :   COPY fname1$ to fname2$
PAUSE command improved
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 09:31am 09 Jun 2021
Copy link to clipboard 
Print this post

  lizby said  
  Mixtel90 said  I wondered why MOSI/MISO hadn't been used too. Apparently Raspberry Pi chose Tx/Rx because the Pico can be either a master or a slave device and the terms change depending on which it is.


It may also be because, however innocuously widespread in the tech world, the use of "slave" is now broadly deprecated.

True, but I got my info from the book. :)

I support MOSI and MISO, but I can see the problem when you come to labeling pins on a device that could be either the controller or the controlled. I don't think they had much choice given the circumstances.
Mick

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

Joined: 05/03/2018
Location: Netherlands
Posts: 3558
Posted: 10:54am 09 Jun 2021
Copy link to clipboard 
Print this post

I will have time to look into the FFT over the weekend.

Volhout
PicomiteVGA PETSCII ROBOTS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 12:03pm 09 Jun 2021
Copy link to clipboard 
Print this post

Running Paul_L's ta.bas benchmark, I note that reads take nearly 3 times as long as writes. Is this to be expected in the long run?

Running on computer 'picomite' on 09-06-2021 at 08:54:13
Starting 1,000,000 iterations of empty loop ...
Finished 1,000,000 iterations of empty loop in 12182.39ms or 0.0122 ms per iteration.
Starting reading 100 line file 10,000 times ...
Finished reading 100 line file 10,000 times in 635596.301ms or 0.6356 ms per iteration.
Starting writing 1,000,000 line file ...
Finished writing 1,000,000 line file in 222768.044ms or 0.2228 ms per iteration.
Starting parse 9 strings from 100,000 strings ...
Finished parse 9 strings from 100,000 strings in 115631.11ms or 0.1285 ms per iteration.
Starting extracting the value from a string 1,000,000 times ...
Finished extracting the value from a string 1,000,000 times in 61277.231ms or 0.0613 ms per iteration.
Finished 4,900,000 iterations on computer 'picomite' in  1.047486242e+06ms or 0.2138 ms per iteration.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 12:38pm 09 Jun 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  I support MOSI and MISO, but I can see the problem when you come to labelling pins on a device that could be either the controller or the controlled. I don't think they had much choice given the circumstances.


to eliminate the confusion, why not change the pin allocation syntax to:

OPTION SPI a, b, c
OPTION SPI0 d, e, f
OPTION SPI1 g, h, i
OPTION SPI2 j, k, l
OPTION SPI3 m, n, o
etc.

where a..o are pin numbers (GP0..GP22 or 1..40), and the option is NOT persistent.

each OPTION SPIn... would replace three setpin commands, and the only reference to in/miso, out/mosi, clock, etc would be in the documentation.

do the same for: I2C, I2C0, I2C1..I2Cn.

the big advantage: you don't need to worry about 0-based or 1-based numbering. simply keep a pool of SPI and I2C interfaces, and when a configuration is specified, allocate the first unused interface in the pool that matches type and pins specified, which is thereafter bound to the SPIn or I2Cn label.

once the OPTION... line is specified, the syntax would then follow what mmbasic has done in the past. ie, open the port with SPIn OPEN... or I2Cn OPEN... and proceed from there.


cheers,
rob   :-)
Edited 2021-06-09 22:40 by robert.rozee
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 12:42pm 09 Jun 2021
Copy link to clipboard 
Print this post

  lizby said  What about a flash command like

FLASH READ n,"filename.bas" ' Reads a program from SD & loads to the specified flash spot

This might enable something like Thwill's chained tests.

With FLASH WRITE (rather than FLASH READ), this would also enable setting up the flash under program control--especially useful when we're reflashing the firmware so frequently and thus wiping out the program flash:
pgm$(9)=("","menu.bas","bench.bas","speed.bas","grain.bas","ta.bas","","","","")
for i=1 to 9: flash erase i: flash write i,pgm$(i): next i
flash run 1


~
Edited 2021-06-09 22:48 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 01:13pm 09 Jun 2021
Copy link to clipboard 
Print this post

  Quote  to eliminate the confusion, why not change the pin allocation syntax to:



horses and stable doors - this is now fixed  and I am using the Raspberry Pico pin nomenclature as described above
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 01:17pm 09 Jun 2021
Copy link to clipboard 
Print this post

  robert.rozee said  
  Mixtel90 said  I support MOSI and MISO, but I can see the problem when you come to labelling pins on a device that could be either the controller or the controlled. I don't think they had much choice given the circumstances.


to eliminate the confusion, why not change the pin allocation syntax to:

OPTION SPI a, b, c
OPTION SPI0 d, e, f
OPTION SPI1 g, h, i
OPTION SPI2 j, k, l
OPTION SPI3 m, n, o
etc.

where a..o are pin numbers (GP0..GP22 or 1..40), and the option is NOT persistent.

each OPTION SPIn... would replace three setpin commands, and the only reference to in/miso, out/mosi, clock, etc would be in the documentation.

do the same for: I2C, I2C0, I2C1..I2Cn.

the big advantage: you don't need to worry about 0-based or 1-based numbering. simply keep a pool of SPI and I2C interfaces, and when a configuration is specified, allocate the first unused interface in the pool that matches type and pins specified, which is thereafter bound to the SPIn or I2Cn label.

once the OPTION... line is specified, the syntax would then follow what mmbasic has done in the past. ie, open the port with SPIn OPEN... or I2Cn OPEN... and proceed from there.


cheers,
rob   :-)


Personally I can't see a reduction in confusion there...
I think you're trying to confuse my poor old brain cells. lol

There's no compatibility with the way the Pico works, of course, and no compatibility with the way the Pico hardware is documented either.
There's no real compatibility with the way MMBasic works either.
It's not self-documenting like the Setpin system either.
At least TX/RX tell you which pin has which direction. :)

I was able to convert a 2014 I2C Micromite library to the Picomite by simply adding two SETPIN commands at the beginning. It's quite clear what I did and which pins were allocated to which functions - and the fact that I was allocating pins. I'd say that was a pretty elegant solution.
Mick

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

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 01:20pm 09 Jun 2021
Copy link to clipboard 
Print this post

we're still in alpha... we need all syntax to be as clean as possible, so that mmbasic for pi pico becomes as popular as MicroPython    


cheers,
rob   :-)
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 06:48pm 09 Jun 2021
Copy link to clipboard 
Print this post

@matherp

Is there a possibility of enabling the GP24 (possibly as Pin(VBUS)) and ADC3 (Pin(VSYS)) inputs eventually? They would be very useful for battery powered installations. I was thinking of data logging. Probably not much use for the RTC as I think the current consumption is rather high.
Mick

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

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 09:29pm 09 Jun 2021
Copy link to clipboard 
Print this post

Hello,

is there any documentation for the picomite?
Is it running on top of linux, in a shell?
THX
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 09:49pm 09 Jun 2021
Copy link to clipboard 
Print this post

There's no linux for the Pico (yet). It's a microcontroller rather than a computer so there's no OS as such.

Normally it's programmed in C/C++ but Raspberry Pi have mad MicroPython (Python 3) available for it as the "adopted standard" for high-ish level programming.

There is a lot of very good documentation:
https://www.raspberrypi.org/documentation/rp2040/getting-started/
There is also a beginners book (but still useful) on MicroPython:
https://hackspace.raspberrypi.org/books/micropython-pico
.
.
Edited 2021-06-10 07:52 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
     Page 12 of 17    
Print this page
© JAQ Software 2024