![]() |
Forum Index : Microcontroller and PC projects : PicoMite Alpha Firmware
![]() ![]() |
|||||
Author | Message | ||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
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 StatesPosts: 263 |
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 KingdomPosts: 9992 |
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 StatesPosts: 263 |
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 KingdomPosts: 9992 |
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 ZealandPosts: 9452 |
@ 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: NetherlandsPosts: 4811 |
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 KingdomPosts: 9992 |
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: NetherlandsPosts: 4811 |
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 KingdomPosts: 4240 |
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 MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
cdeagle Senior Member ![]() Joined: 22/06/2014 Location: United StatesPosts: 263 |
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 StatesPosts: 3298 |
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 StatesPosts: 263 |
@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 StatesPosts: 3298 |
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: NetherlandsPosts: 4811 |
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: UkrainePosts: 161 |
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 KingdomPosts: 7458 |
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 |
||||
![]() ![]() |
![]() |