Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:49 10 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 : Draft PicoMite 6.00.01 User Manual

     Page 12 of 13    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7501
Posted: 07:58am 06 Feb 2025
Copy link to clipboard 
Print this post

TBH I also prefer MISO and MOSI, but these are now discouraged as being not politically correct. The Raspberry Pi Datasheet(s) always use SPI TX and SPI RX so MMBasic is quite correct to use that terminology.

Interesting about the clk/tx swap. The manual appendix and the setpin command agree with each other so I would have assumed that was correct. I can't explain why the MCP4822 has them wrong. It certainly doesn't when it's set up using option audio spi.
Mick

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4854
Posted: 08:53am 06 Feb 2025
Copy link to clipboard 
Print this post

@Mick,

MISO and MOSI can stay. We have Trump now, and all the woke movements will diminish.
It was bullsh*t alltogether. What does an electrical signal name have to do with our history, even if we are ashame.  

Volhout
PicomiteVGA PETSCII ROBOTS
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 374
Posted: 09:32am 06 Feb 2025
Copy link to clipboard 
Print this post

@Volhout    

MISO and MOSI explains much better the SPI lines than Rx and Tx. I have several times been confused  with the SPI Rx and Tx. In the Manual prints I have changed to MISO MOSI.

Pluto
 
davematt
Regular Member

Joined: 27/09/2011
Location: Australia
Posts: 55
Posted: 10:42am 06 Feb 2025
Copy link to clipboard 
Print this post

Hi all, trying to set the record straight, multiple er, confusion. The Option System SPI appears reversed from the Setpin SPI commands. Your’re right Mick, Command listing and appendix D agree. So I thought “must have made a silly mistake”, and went back to setpin spi as in the appendix. This time it worked, and appears to work correctly even with the setpin numbers in reverse order. Don’t understand that at all.
D
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2415
Posted: 10:45am 06 Feb 2025
Copy link to clipboard 
Print this post

In this post I think TassyJim uses the pin order as per the manual for SETPIN but could the Pin order really be the same as used in SYSTEM SPI?
SETPIN 11, 20, 19, SPI2         ' assign SPI I/O pins, RX, TX, CLK <----?--11, 20, 18 or 10, 19, 20 ?

Pin diagram shows Clk=10,Tx=11,Rx=12   Clk=18,Tx=19,Rx=20

OPTION SYSTEM SPI CLKpin, MOSIpin, MISOpin

SETPIN rx, tx, clk, SPI2

Confused.

Footnote added 2025-02-07 07:28 by phil99
What people have missed:-
SETPIN 11, 20, 19, SPI2
Has 2 Tx pins and no clock.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7501
Posted: 10:51am 06 Feb 2025
Copy link to clipboard 
Print this post

I may be remembering incorrectly (it wouldn't be the first time!) but I think Peter changed at least some options so that the order of the GPIOs didn't matter, it just sorts itself out. That was quite some time ago. The system "knows" which pins are valid for which function.
.
Edited 2025-02-06 20:52 by Mixtel90
Mick

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

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6219
Posted: 08:52pm 06 Feb 2025
Copy link to clipboard 
Print this post

Correct.
The order of the pins in the SETPIN command doesn't matter.

  Quote  Pins must be chosen from the pin designation diagram and must be allocated
before the devices can be used. Note that the pins (eg, rx, tx, etc) can be
declared in any order and that the pins can be referred to by using their pin
number (eg, 1, 2) or GP number (eg, GP0, GP1).


As long as you wire up the pins correctly.

I agree that it looks odd when the order in the manual for SETPIN is different to the order in the OPTION section.

It does require the user to read the manual...

Jim
VK7JH
MMedit
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1526
Posted: 01:47pm 08 Feb 2025
Copy link to clipboard 
Print this post

Hi Geoff,
a typo concerning CHDIR dir$:
The manual says on page 102
  Quote  CHDIR dir$
... The special entry “.” represents the the parent ...

Two dots = “..” would be correct.

Kind regards
Michael

EDIT:
Perhaps the copy command should be expanded. Copy "*" is not case sensitive! That means "x.bas" and "X.bas" become just "X.bas".
Edited 2025-02-09 00:02 by twofingers
causality ≠ correlation ≠ coincidence
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 04:08pm 08 Feb 2025
Copy link to clipboard 
Print this post

  twofingers said  EDIT:
Perhaps the copy command should be expanded. Copy "*" is not case sensitive! That means "x.bas" and "X.bas" become just "X.bas".

Only true (I hope) if the destination file system isn't case-sensitive.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10066
Posted: 04:13pm 08 Feb 2025
Copy link to clipboard 
Print this post

  Quote  Only true (I hope) if the destination file system isn't case-sensitive.


If the source file system isn't case sensitive then the two files can't both exist so the problem can't occur
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1526
Posted: 04:24pm 08 Feb 2025
Copy link to clipboard 
Print this post

  matherp said  ... If the source file system isn't case sensitive then the two files can't both exist so the problem can't occur

But when copying from A: to B: it occurs because A: is case sensitive.
It is just important to know this and to use only lowercase letters if possible.
Michael
causality ≠ correlation ≠ coincidence
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 04:46pm 08 Feb 2025
Copy link to clipboard 
Print this post

I'd say that on any file system you need to be aware as to whether it is case sensitive or not.

It's arguably never wise to have two or more different files which have names differing only in case.  You're not helping anyone to understand what's going on and if the files might ever need transferring to a file system which has case issues then you've made a time bomb.

John
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1526
Posted: 05:06pm 08 Feb 2025
Copy link to clipboard 
Print this post

  JohnS said  I'd say that on any file system you need to be aware as to whether it is case sensitive or not. ...

I agree. But in this case we are dealing with three slightly different systems Picomite A: , Picomite B: and imported files from Windows/Linux...

  JohnS said  It's arguably never wise to have two or more different files which have names differing only in case.  You're not helping anyone to understand what's going on and if the files might ever need transferring to a file system which has case issues then you've made a time bomb.

John

That's obvious. It happened to me because I wasn't paying attention and the Caps Lock key was on.
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10066
Posted: 09:22am 09 Feb 2025
Copy link to clipboard 
Print this post

Geoff

Please could you amend the description of LINE PLOT as follows:

  Quote  Plots a line graph from an array of y-axis data points.
‘ydata’ is an array of floats or integers to be plotted
‘nbr ‘is the number of line segments to be plotted - defaults to the lesser of the
array size and MM.HRES-2 if omitted
‘xstart’ is the x-coordinate to start plotting - defaults to 0
‘xinc’ is the increment along the x-axis to plot each coordinate - defaults to 1
‘ystart’ is the location in ydata to start the plot - defaults to the array start. NB: respects OPTION BASE
‘yinc’ is the increment to the index into ydata to add for each point to be plotted
‘colour’ is the colour to draw the line
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4251
Posted: 02:33pm 09 Feb 2025
Copy link to clipboard 
Print this post

Not that I can test any of this (hint hint), but the documentation for GAMEPAD is incomplete.

The section for DEVICE GAMEPAD says "See GAMEPAD command", but there is no documentation for the GAMEPAD command ;-)
   - Needs to cover GAMEPAD COLOUR, INTERRUPT and HAPTIC including the ranges of their inputs.
   - Maybe worth saying somewhere that you don't need to OPEN a GAMEPAD device ?
   - [Observation] COLOUR sub-command might be better called LED
   - [Observation] I think HAPTIC enables the "rumble triggers" rather than the general controller rumble which is more commonly available, I imagine the PS4 controller has both, but something like an XBOX 360 controller (which I know doesn't work with the PicoMiteVGAUSB) has a general rumble but no rumble triggers.

For what little it is worth, the next MMB4L alpha will have:
DEVICE GAMEPAD LED id, red, green, blue
DEVICE GAMEPAD RUMBLE id [, low_freq] [, high_freq] [, duration_ms]
DEVICE GAMEPAD RUMBLE id, OFF
DEVICE GAMEPAD RUMBLE TRIGGERS id [, left] [, right] [, duration_ms]
DEVICE GAMEPAD RUMBLE TRIGGERS id, OFF

Plus a best effort at matching the PicoMiteVGAUSB when OPTION SIMULATE PicoMiteVGAUSB is used.


In addition The documentation for the functions DEVICE GAMEPAD/WII/CLASSIC/NUNCHUK does not indicate the range of return values for the analog inputs.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2415
Posted: 10:23pm 09 Feb 2025
Copy link to clipboard 
Print this post

OPTION RESET OLIMEX.
Another thing to add to the manual.

I guess OPTION RESET LIST covers it but anyone searching for OLIMEX won't find it.
Perhaps include a list of the available configurations.
Edited 2025-02-10 10:03 by phil99
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 295
Posted: 02:41pm 22 Feb 2025
Copy link to clipboard 
Print this post

I believe something is unfinished here

My MMBasic 'sand box'
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 02:59pm 22 Feb 2025
Copy link to clipboard 
Print this post

Good one!
I think that is Peter taking a mad stab in the dark.

Geoff
Geoff Graham - http://geoffg.net
 
LouisG
Senior Member

Joined: 19/03/2016
Location: Australia
Posts: 125
Posted: 05:11am 24 Feb 2025
Copy link to clipboard 
Print this post

On Page 37 are listed the basic commands for reading and writing data.

The very first command is OPEN.

To me, a relative beginner, OPEN is a reasonable command. With it you open something that is closed. But how do you make that something in the first place? What command do I use to create a file? There is no such command in the entire list!

After an hour of searching I discovered, by accident, a clue. It was in the section on Sequential I/O. OPEN also doubles as CREATE!

Would it be so terrible to include this fact in the manual's definition of OPEN?

Regards,
Louis
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 868
Posted: 06:31am 24 Feb 2025
Copy link to clipboard 
Print this post

Hi Louis,
I'm sure that others can give better answers but the following pages of the manual give more information on "OPEN", including that if a file of that name doesn't exist then it creates one for you.
MMBASIC tries to comply with the general BASIC language and this use of OPEN almost pre-dates me.
Please also bear in mind that everyone involved with developing and improving MMBasic, and its firmware, give of their time freely. Some have day jobs and some are using up precious retirement time; so replies may not always be as prompt as in a commercial environment.

Cheers,

Andrew
 
     Page 12 of 13    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025