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 firmware release V5.07.04
Page 3 of 4 | |||||
Author | Message | ||||
Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 384 |
Hello, error in the new manual on page 51 "DE for Germany" it is GR |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
The manual is just wrong, the SDK call used to initialise the PIO specifically clears pinctrl. If using any outputs you must then set up pinctrl. In the manual the command should be PIO init machine 0,0,100000,Pio(pinctrl 0,1) The attached is tested and works perfectly on the PicoMiteVGA Dim a%(7)=(&H0001E000E101E081,0,0,0,0,0,0,0) SetPin 1,pio1 PIO program 1,a%() PIO init machine 1,0,100000,Pio(pinctrl 0,1) PIO start 1,0 |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3558 |
Hi Peter, Thanks. I hope you can handle another question.... I get a strange error in this piece of code. It is a PIO function to measure period, and put the result via ISR into FIFO I would like to use your READ PIO command to read the fifo, but I get a strange error: [45] Read pio 1,0,3,x%() Error : Variable name PIO measure period 'generate 1khz test tone on GP0 SetPin gp0,pwm0a SetPin gp1,pio1 'not sure if this is needed PWM 0,1000,50 'pio program, measure period on GP1 ' '0 set x 0 E020 '1 jmp pin 3 00C3 '2 jmp x-- 1 0041 '3 jmp x-- 4 0044 '4 jmp pin 3 00C3 '5 mov -x isr A0C9 '6 push noblock 8000 '7 jmp always 1 0001 ' Dim a%(7)=(&h0044004100C3E020,&h00018000a0c900C3,0,0,0,0,0,0) Print "pre-init" Print "&h";Hex$(Peek(word &h503000c8));" clkdiv" Print "&h";Hex$(Peek(word &h503000cc));" execcl" Print "&h";Hex$(Peek(word &h503000d0));" shftcl" Print "&h";Hex$(Peek(word &h503000dc));" pinctl" 'c=Peek(word &h503000c8) 'e=Peek(word &h503000cc) e=Pio(execctrl 1,0,&h1f) s=Peek(word &h503000d0) p=Peek(word &h503000dc) p=0 PIO program 1,a%() PIO init machine 1,0,100000,p,e,s Print "post init" Print "&h";Hex$(Peek(word &h503000c8));" clkdiv" Print "&h";Hex$(Peek(word &h503000cc));" execcl" Print "&h";Hex$(Peek(word &h503000d0));" shftcl" Print "&h";Hex$(Peek(word &h503000dc));" pinctl" PIO start 1,0 Dim x%(3) Pause 1000 Read pio 1,0,3,x%() For i=0 To 3 Print x%(i), Next i Do 'nothing Loop While Inkey$="" Again, this is the standard picomite, using PIO1 sequencer 0. PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
pio read ? |
||||
led-bloon Senior Member Joined: 21/12/2014 Location: AustraliaPosts: 203 |
@matherp https://github.com/UKTailwind/PicoMite There is a file incorrectly named: PicoMite V5.05.03 Release notes.txt The first line of that file reads: PicoMite V5.07.03 Changes from V5.07.01 The file is also provided in the software download zip file. Perhaps delete the file altogether and let README.md be the main guide? https://github.com/UKTailwind/PicoMite-VGA-Edition Refers to: PicoMiteVGA V5.07.04RC2 led Miss you George |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3558 |
This may be a bug.... PIO READ PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
It is a day one bug. Clearly you are the first to ever try and use it as it doesn't work and couldn't ever have worked. Your PEEK is an excellent workaround. I'll put it on the list for the next release |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
This is something that I have found over the years. The moment you make a big release someone finds a bug. I'm not complaining, finding bugs is wonderful. But it is frustrating just when you thought you had nailed it. Geoff Geoff Graham - http://geoffg.net |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5737 |
LOL - I was thinking *exactly* the same thing earlier this morning. Those bugs always appear magically after any big release. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3558 |
@Peter, Maybe you could also look at the helper function PIO(PINCTRL ) You should be able to pass 7 parameters, but after 3 parameters you get a syntax error. Using the VGA version of pico 5.07.04 Thanks Edited 2022-05-15 06:36 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
The pin parameters must be formatted GPn e.g. ? pio(pinctrl 1,1,1,gp0,gp7,gp26) |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3558 |
Thanks, But we need to adapt the documentation (user manual ('s)), to make this clear. In both manuals in the command list, but also the desctiptions that 7'th parameter (OUT_BASE) is missing. The software 5.07.04 supports the 7'th parameter. Only missing in the documentation. I have one more question. Interaction between PIO and MMBASIC is designed through PIO READ and PIO WRITE. Do you see a way how MMBASIC can check the level at a GPIO pin that is controlled from the PIO. I cannot simply read the pin, since it is not set to DIN, but assigned PIOx I could hardwire the PIO controlled pin to a unused pin, and set that as input, but that wastes pins (I have 5 to check) PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
Volhout Please could you see if the attached fixes the PIO READ bug PicoMiteVGA (2).zip You may be able to peek the relevant register to check the status of a PIO pin but I can't confirm if this is the case |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3558 |
Hi Peter, Yes, PIO READ works now as advertized in the manual. One remark: you can only read data into an array. If you want to read a single word, you have to dimension an integer array size 1. You cannot read 1 word into an integer variable. That is compliant with the manual, but a bit awkward. Because you can not dim a%(0) pio read 1,0,1,a%() since you cannot dimension an array size 1 So you need to dim an array size 2, and use only 1 cell. Edited 2022-05-16 02:25 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
You can try this - should now accept an integer variable IFF nbr is 1 Also you can now use PIN(N) on a PIO assigned pin - can't guarantee any useful data but worth trying PicoMiteVGA.zip |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3558 |
This is great !!! I already implemented the peek of the GPIO input register, but the PIN() is much more readable. Thanks a lot. Reason I use this function is because I have two PIO sequencers that runs a-synchronous, and an MMBasic program that runs asynchronous. One PIO program frequency demosulates an SSTV input signal and outputs to status pins. The second program reads this pins, and creates the pixel data (to be displayed in the basic program through the FIFO of that program) But during this process there is VIT data that I decode in the MMBasic program. The VIT data decoder samples the demodulator at specific time stamps. But since the demodulator and the data decoder run asynchronous, I cannot use the FIFO since: the fifo is filled faster than the MMBAsic program can empty is, and I am not sure what entry in the FIFO represents that current demodulator output. So I monitor the GPIO's.... These contain the latest state, all history is lost, and should be. Nice would be if the FIFO's could be tuned to 1 word deep (not 4 words). That would make life easier.. As does the new PIN() function where I can read the PIOx assigned pin status !!! Thanks One more question, maybe youu know how to, otherwise I must search for a solution: The SSTV video data format sends 120-320 pixels G, then B then R in one line. Can I use the video memory to memorize the green, then add the B and then the R to the same pixels ? Is there is way to read the color of a pixel (mode 2) , then update its colour and write it back ? The alternative would be to create large pixel buffers in basic before processing the bits. The SSTV video data arrives as this order (bits(*)) at 0.572ms per pixel. G1, G2, G3, ....G320, B1, B2, B3.....B320, R1, R2, R3, ....R320 Thanks for brainstorming... (*) I demodulate 1 bit per pixel colour because the 8/16 bit colour of the VGA. EDIT: already got it. PIXEL is a command, but also a function. Easy.... Edited 2022-05-16 17:26 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
I'm curious why the #1 design does not include sound? Bill Keep safe. Live long and prosper. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
The main reason is that the audio quality would have been poor unless the Pico's on board regulator was replaced with an external linear regulator. Adding that and the low pass filter would have doubled the component count when Design #1 was intended to be simple and elegant. Secondly, where do you stop? Why not also add an audio amplifier? IR Receive? RTC? Temperature? etc. Peter's design included many of these features (including an external linear regulator) so if you wanted more you always could go with that design. Geoff Geoff Graham - http://geoffg.net |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
I take your point, thanks Geoff. If I recall correctly the original Mono Maximite did not have sound in the beginning either. Bill Keep safe. Live long and prosper. |
||||
led-bloon Senior Member Joined: 21/12/2014 Location: AustraliaPosts: 203 |
@Geoff PicoMite_Firmware.zip and PicoMiteVGA_Firmware.zip both contain the file "...V5.05.04 Release notes.txt" which is obviously incorrectly named as it displays V5.07.04 updates/bug fixes over V5.07.03 release. @matherp A similar problem exists with the source code downloads: Look here led Miss you George |
||||
Page 3 of 4 |
Print this page |