Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:00 20 Apr 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 17 of 17    
Author Message
lizby
Guru

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

  Mixtel90 said  I've found that with a lot of modern LEDs you only need a couple of mA, especially for indoor use. You can sometimes manage with less than that.

I ran a PICAXE for 11 years off of the same 3 AA batteries, blinking an LED with a 22K resistor every 7 seconds. You had to shade the LED in your hands to be able to see it, but there it was--heartbeat on 4V5/22000 -> .2mA.

It was visible (barely, after 11 years, when quite dark) down to 1.8V, so 1.8/22000 -> .08mA.

~
Edited 2021-06-17 23:13 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 261
Posted: 06:07pm 17 Jun 2021
Copy link to clipboard 
Print this post

Here's a picture of a Pico version of my MMBASIC automatic nightlight. A Waveshare DS3231 RTC board is under the Pico. The relay board is from Evil Mad Scientist.




 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 06:27pm 17 Jun 2021
Copy link to clipboard 
Print this post

a26
PicomiteV5.07.00a26.zip


Updates to MMBasic to bring in-line with Geoff's latest release

TEMPR fixed

Speed improvements to SDcard access. Note if the selected pins are valid for spi0 or spi1 the firmware will automatically use the H/W SPI which will block it for other uses, this is in preparation for LCD displays and touch. NB using the SDCARD will always be comparatively slow. The FatFS code is large and has many moving parts which is going to kill the instruction caching. The TA program read test is particularly bad as it repeatedly opens and closes a file rather than just reading

FFT fixed

Edit colours changed

NOTE TO CDEAGLE

I loaded npoe using autosave C and it loaded fine. I had to change a variable name "inc" in a couple of places to "iinc" and it seems to be running
Edited 2021-06-18 05:08 by matherp
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 261
Posted: 09:39pm 17 Jun 2021
Copy link to clipboard 
Print this post

Thanks Peter. I have not used the AUTOSAVE Crunch command until now.

Thanks also for the PicoMite version of MMBASIC.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 09:48pm 17 Jun 2021
Copy link to clipboard 
Print this post

Didn't seem to get any output - just returned to the prompt



Edited 2021-06-18 07:50 by matherp
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9051
Posted: 06:20am 18 Jun 2021
Copy link to clipboard 
Print this post

@ matherp - Way back near the start of this thread, you had just about given up on this port, cos of issues with the memory slots.  Then you found a solution, and the port continues to this point.

I am very curious as to what you needed to change/do to fix the problem with the flash slots that was JUST ABOUT causing you to throw in the towel on this port.  That was never elaborated on other then to say that you found a way around it.

I would love to know what you needed to do to get things to work - just to satisfy my curiosity more then anything else, but I expect other members here are also wondering what you did/had to do to get the port back on track.

Welcome back, BTW.
Smoke makes things work. When the smoke gets out, it stops!
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3496
Posted: 07:54am 18 Jun 2021
Copy link to clipboard 
Print this post

a26: something strange with PWM.

When I run a program that uses pwm. stop it , and re-run it I get:

[18] Setpin 1,pwm0a
Error : Pin 1 is in use.

Even with switching the PWM off prior to re-defining, the same error


PWM 0, off
Setpin 1,pwm0a


I get this error.
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 08:06am 18 Jun 2021
Copy link to clipboard 
Print this post

  Quote  a26: something strange with PWM.


Can't replicate - please post a program that demonstrates the issue

SetPin 1,pwm0a
PWM 0,1000,50
Pause 10000


The above works fine whether I interrupt with Ctrl-C or run to completion
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3496
Posted: 09:19am 18 Jun 2021
Copy link to clipboard 
Print this post

Hi Peter,

'dual Servo sweep

'defines
FREQ=50                 'Hz
PERIOD=1E6/FREQ         'us
PWmin=800               'us
PWmax=2200              'us
DCmin=100*PWmin/PERIOD  '%
DCmax=100*PWmax/PERIOD  '%
DCrange=DCmax-DCmin
ANmin=-90               'degrees
ANmax=+90               'degrees
ANrange=ANmax-ANmin

'IO setup
'PWM 0,off
SetPin 1,pwm0a
SetPin 2,pwm0b

'Sweep servo
Do
For angle = ANmin To ANmax Step 1
 DC = DCmin + ((angle-ANmin)/ANrange)*DCrange
 PWM 0,FREQ,DC,DC
 Pause 20
 Print angle
Next angle
For angle = ANmax To ANmin Step -1
 DC = DCmin + ((angle-ANmin)/ANrange)*DCrange
 PWM 0,FREQ,DC,DC
 Pause 20
 Print angle
Next angle
Loop
End


To be honest, this is a program residing in flash from an earlier release (I think a22). I noticed this program "looked" good (no token changes). But has this error message.
I erased the memory, and via autosave loaded it back in again. And the problem is consistent. After initial run you can only get it to run again after a power cycle.



EDIT: SOLVED

After OPTION RESET and VAR CLEAR it works. My oops.... Sorry


Volhout
Edited 2021-06-18 19:31 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 09:32am 18 Jun 2021
Copy link to clipboard 
Print this post

I've updated to a26 and the SDcard has stopped working again, any suggestions as to what needs to be kicked:

> option list
OPTION CPUSPEED (KHz) 250000
OPTION SDCARD GP15
OPTION SYSTEM SPI GP10,GP11,GP12
> files
Error : A hard error occurred in the low level disk I/O layer
> Warning: SDcard Removed


I'm using the SDcard on the Cytron Maker Pi Pico (rev 1.2) board.

Thanks in advance,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 261
Posted: 09:37am 18 Jun 2021
Copy link to clipboard 
Print this post

Hi Peter

Attached in a zipped file of a crunched version of NPOE. It runs on my Pico without any problems. After crunching, the source file is about half size. There is a bit of time before new screen displays appear.

npoe_crunch.zip
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3008
Posted: 10:45am 18 Jun 2021
Copy link to clipboard 
Print this post

  cdeagle said  Attached in a zipped file of a crunched version of NPOE.

How is this crunch being performed?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 261
Posted: 10:55am 18 Jun 2021
Copy link to clipboard 
Print this post

@lizby

The NPOE MMBASIC source code is opened in an editor (Geany for example). The entire file is selected and copied within the editor. At the Teraterm command line, autosave c [Enter] is typed. The copied file is then pasted into the Teraterm command window.

The NPOE program can then be run and saved to disk or sdcard in crunched format.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3008
Posted: 11:05am 18 Jun 2021
Copy link to clipboard 
Print this post

AUTOSAVE C

Cool, thank you.

>AUTOSAVE  (and then after pasting and Ctrl-Z)
Saved 33593 bytes
> memory
Program:
 31K (32%) Program (1120 lines)
 49K (68%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
112K (100%) Free

>AUTOSAVE C  (and then after pasting and Ctrl-Z)
Saved 21139 bytes
> memory
Program:
 18K (19%) Program (986 lines)
 62K (81%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
112K (100%) Free
>

Learn something new every day.

Also learned about geany--another multi-document text editor. I've installed it and am about to start using it for the 4th multi-document project I'm working on--alongside NotePad++, EditPad Lite, PSPad, NoteTab Light, fbIDE, . . ..

Thanks for that, too.

~
Edited 2021-06-18 21:27 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3496
Posted: 11:35am 18 Jun 2021
Copy link to clipboard 
Print this post

hi cdeagle,

About NPOE and crunching....
If I look at this, another 1k can be shaved off in crunch mode.





MMBasic does not need all this space (read: these spaces).

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 05:36pm 19 Jun 2021
Copy link to clipboard 
Print this post

Joining the club. Got my Pico. Loaded drivers on Win7 using Zadig. Alpha 26 is running fine.

By the way, two devices appeared in Win7 Device Manager after connecting Pico.
First device - Board CDC - it became a com port after installing drivers.
Second device - Reset - what is this device for?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5705
Posted: 07:17pm 19 Jun 2021
Copy link to clipboard 
Print this post

Using a26
I'd setup OPTION AUTORUN 10 to load & run a program that set DATE$ and TIME$ from a DS3231 on i2c then executed NEW to wipe the program from memory. I'm pretty sure that DATE$ and TIME$ were preserved under a25 - I've not checked. Was I imagining it? lol
Mick

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


To reply to this topic, you need to log in.

© JAQ Software 2024