![]() |
Forum Index : Microcontroller and PC projects : PicoMite V5.07.00b0 - beta firmware
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
Any hope for this: Since the fault in the ILI9488 MISO drive prevents BLIT READ, could we have a BLIT LOAD # to perform the work of LOAD IMAGE and BLIT READ? BLIT LOAD # "file.bmp" PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
Nope, same problem here. I was bust prifrodding th dok file though so I didn' botter much too about it. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
V5.07.00b5 PicoMiteV5.07.00b5.zip |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
A question for those who play with servos... Rather than using PWM, could you use SETTICK to trigger the start of all servos then use PULSE for each servo pin that you want? The period of the SETTICK gives you the start of every "field" and the pulse length gives you the position. That way you can have a servo on every DOUT if you want, there's no limitation placed by the number of PWM ports. It seems a logical way to do things to me as AFAIK the servos aren't terribly bothered about frequency, it's the mark-space ratio. EDIT: Just been playing... Setpin GP25 dout Settick 20, servo k=90 'set the angle in degrees from 0-180 p=1+(k/180) do loop sub servo pulse gp25, p end sub It seems to work nicely. :) I don't have a servo to play with though. Something caught me out - if you use Input k in the loop it doesn't work because the Settick interrupt isn't called while Input is waiting. I'd forgotten that. EDIT - formula fixed. Now gives 1ms-2ms at 20ms intervals, with 1.5ms at 90 degrees Edited 2021-07-23 19:14 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4811 |
@Mixtel Your Tinam (this Is Not A Manual) document comes pretty close to becoming one. I had problems opening the RTF on my old Linux machine, but converted it to PDF on windows, and then used the PDF. Some remarks: 1/ CPU speed default is 125000, range is 48000 to 250000, anything above 133000 is overclocking the chip. 2/ If you put the OPTIONS also in a table that improves readability. 3/ There are 3 table entries for Setpin. Maybe move these together (relocate the ON KEY and VAR SAVE blocks). 4/ Bitbang has no explanation of n and transitions 5/ some more are missing all explanation...understood, this is WIP.... @Matherp In reading though the list I noticed some commands differ from the MMBasic standard, as set by Geoff. i.e. you used Bitbang Humid, where Geoff uses Humid. Maybe these can be aligned so the picomite comes more in line with the MM2 and MM+ microcontrollers. Rather loose compatibility with flagships CMM2 and CMM2 gen2, then drift away from the de-facto microcontroller standard MX170. I wish you all a good holiday, Volhout Edited 2021-07-23 19:59 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
I'll have another look at it in a little while. :) SETPIN does actually have slightly different functions, that in particular is why the assignment pit is separate. I was also stuck with an editor that doesn't seem to let you create new rows in an existing table. :( Most commands are either completely missing or have bits of explanation missing. This doesn't bother me for this particular document. :) I don't actually know how some of the commands work, never having used them and not having my CMM2 set up. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
Which commands would you like me to drop to make space in the command table? ADC? ![]() |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4811 |
NO, do not remove ADC, at least not until I have tested it properly... ![]() Commands: There are some duplicates: Else If and ElseIF End If and EndIf Then there are some that may be combined Exit Exit Do Exit For Exit Sub Exit Function (I am sure the difference is what they pull from the stack, but maybe they can be combined). And some things I have at home, but do not use, like "Cat" PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
Are there? Why not try using both in the editor and then do a list |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
I'm just too nice to you lot ![]() V5.07.00b6 PicoMiteV5.07.00b6.zip BLIT LOAD [#]n, "filename" [,xstart] [,ystart] [,xlen] [,ylen] This loads into blit buffer n the image from filename. The image must be a 24-bit bmp. The optional parameters specify the start position in the image to load from and the width and height to load. so: BLIT LOAD #1,"image1", 50,50,100,100 will load an area of 100 pixels square with the top left had corner at 50,50 from the image image1.bmp BLIT LOAD #1,"image2" will load the entire file image2.bmp assuming there is enough memory available. Edited 2021-07-23 21:51 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
This is true, which makes me even more self-conscious about asking what's the story about increasing the number of supported Subs/Functions ? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
I'm getting very tight on memory without reducing the program and variable sizes but I'll see what I can do - 256 enough? |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
256 would be wonderful and I'd still be happy if I only got 128 and needed to work within that limitation. 64 is just too tight for portability between the CMM2 and the PicoMite, though I managed it with the original Z-MIM on the CMM1 which has the same limitation - which came as a nasty shock and needed a considerable rewrite when I first found out about it. Thank you, Tom Edited 2021-07-23 22:13 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
@Volhout I'm sticking with my decision on SETPIN in this doc. What will happen in the eventual manual I don't know as it's unlikely to be my decision. :) SETPIN pin, cfg [,option] Setting up the pin mode SETPIN pin, cfg, target [, option] Setting up an interrupt for a pin SETPIN pin, device Allocating the pin to an on-chip device are sufficiently different to keep them apart, I think. I've fixed CPUspeed and put the Options in a table. If people want to know about Bitbang I'm afraid they are going to have to read a manual. ;) I only included it because Humid became Bitbang Humid. That's a decision I'm happy to support as it is a bitbang device. All the other platforms are wrong. :) Note that this doc isn't compiled from any of the original manual files - I'm doing it from scratch and (mostly) only putting in stuff that has appeared during PicoMite development. e.g. the fonts are listed because Peter announced that it now had the same 7 fonts as the CMM2. I've no idea what Memory Copy and Memory Set do. I've no idea if Autorun On does anything on the PicoMite either. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4811 |
Else If and ElseIF End If and EndIf Are there? Why not try using both in the editor and then do a list I just looked at "list commands" and noticed the duplicates in the 129 commands supported. Was afraid they would eat up precious command slots in the parser. The editor uses the 2 word version i.e. "End If". PicomiteVGA PETSCII ROBOTS |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
https://www.thebackshed.com/forum/ViewTopic.php?TID=12998&PID=158397#158397 They were also missing from the initial 5.07 CMM2 manual, but Geoff may have fixed that since. Best wishes, Tom Edited 2021-07-23 22:23 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
Yes you do ![]() https://www.thebackshed.com/forum/ViewTopic.php?TID=13849&P=3 |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4811 |
If people want to know about Bitbang I'm afraid they are going to have to read a manual. ;) I only included it because Humid became Bitbang Humid. That's a decision I'm happy to support as it is a bitbang device. All the other platforms are wrong. :) Hi Mixtel90, I immensely appreciate the effort you took to create some form of guide to use the picomite. And it is your work. I will not criticize it, not the slightest. Just want to explain where my concern with HUMID comes from. Look at the SD card as example. It has controlled using SPI, then this proved not to be reliable, and Peter reverted to bitbanging the SD card. The SPI and bitbanging are just software implementations to communicate with the SD card. We are not changing the SD card commands to "bitbang files", "bitbang load "example.bas"". Why is HUMID changed into BITBANG HUMID ? Maybe in the low level drivers Peter uses bitbang, but in essence we read humidity. Same for WS2812. I do understand the existence of the generic "bitbang xx.xx.xx" command to send bitstreams. It has to have a name, why not use bitbang. But under all this there may be a good reason to do it this way. Maybe the WS2812 and HUMID are special configurations of the generic BITBANG command. Similar there is the OneWire function, and the TEMPR(), a special config of the OneWire read. Anyway, it is up to Peter to decide what to do with them. Het has better knowledge of all the MMBasic platforms, and how to maintain compatibility between them. And compatibility is great, in example my Backpack Tracer program only needed an addition of a F4 and Pico configuration, and is running accross MX170, F4, PicoMite without any changes. (appart from the use of ADC as a variable). PicomiteVGA PETSCII ROBOTS |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
By making HUMID a sub-command of BITBANG Peter is able to multiplex one of the command slots. It's the same with all the MATH commands, they only take up one slot instead of 10 (?) Until/unless the underlying MMBasic architecture is rewritten to remove the 128 command + 128 function limitation (which would no doubt break a lot of existing code) Peter has to compromise with tricks like this. Best wishes, Tom Edited 2021-07-23 22:50 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
![]() Ever grateful. ![]() PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
![]() ![]() ![]() ![]() |
![]() |