![]() |
Forum Index : Microcontroller and PC projects : Picomite(VGA) V5.07.07 betas - bug fixes + focus on PIO
![]() ![]() |
|||||
Author | Message | ||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 2027 |
Not really... [300] PIO DMA RX 1,0,&hFFFFFFFF,packed%(),ReadyInt,32,samples% 'start DMA ring bf Error : -1 is invalid (valid is 0 to 2147483647) If nothing goes right ... turn left |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 6828 |
V5.07.07b11 - specially for Volhout ![]() https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip New capabilities for PEEK function peek(bp n%) ' returns the byte at address n% and increments n% to point to the next byte peek(sp n%) ' returns the short at address n% and increments n% to point to the next short peek(wp n%) ' returns the word at address n% and increments n% to point to the next word These make it very efficient for basic code to step through a packed array e.g. dim s$="123456" a%=peek(varaddr s$)+1 'point to the start of the string data for i%=1 to 6 print peek(bp a%) next i% PIO DMA TX and PIO DMA RX now allow up to &HFFFFFFFF transfers Edited 2023-02-01 20:49 by matherp |
||||
JanVolk Newbie ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 4 |
Gentlemen and Matherp I am new to this forum and have encountered something strange after version V5.07.07b5. I am using self-compiled code partly from this forum for an i2c scanner which worked well until V5.07.07b5 and after V5.07.07b7 it stops working and stops at I2C Read i,0,1,temp. Error : Cannot find Temp. And system crashes and ** Fatal Error ** What am I doing wrong or has something changed in the firmware? ' I2C scanner detect aangesloten modules Print " ****************** I2C SCANNER ********************" Print " Input/Output PCF8575 Adres: Dec: 32 Hex:0x20" Print " Input/Output MCP23017 Adres: Dec: 32 Hex:0x20" Print " LCD 20x4 5V0 HD44780 Adres: Dec: 32 Hex:0x20" Print " Licht Lux BH1750 Adres: Dec: 35 Hex:0x23" Print " Temp/%RV DHT20 Adres: Dec: 56 Hex:0x38" Print " LCD 16x2 5V0 KS0066 Adres: Dec: 56 Hex:0x38" Print " Oled 128x64 SSD1306 Adres: Dec: 60 Hex:0x3C" Print " ADC/DAC 8Bit PCF8591 Adres: Dec: 72 Hex:0x48" Print " ADC 4x 16Bit ADS1115 Adres: Dec: 72 Hex:0x48" Print " EEPROM 32K AT24C32 Adres: Dec: 87 Hex:0x57" Print " Klok RTC 3V3 DS3231 Adres: Dec:104 Hex:0x68" Print " Klok RTC 5V0 DS1307 Adres: Dec:104 Hex:0x68" Print " Temp/%RV/Druk BMP280 Adres: Dec:118 Hex:0x76" Print " Opm: Indien module 5V dan pullups extern aan 3V3!" Print " Of een level shifter voor SDA en SCL gebruiken." Print " Dec Hex Hex" For i = 0 To 127 ' Te testen adressen decimaal. I2C Read i, 0, 1, temp ' I2C READ addr, option, rcvlen, rcvbuf. If MM.I2C = 0 Then ' MM.I2C 0=Adres gevonden 1=Geen Adres. Print " Gevonden adres "; Str$(i,3)," &h"; Hex$(i,2); " 0x"; Hex$(i,2) EndIf Next i Print " HEX 0 1 2 3 4 5 6 7 8 9 A B C D E F" For y = 0 To 7 Print " "; Hex$(y, 1); "0: "; For x = 0 To 15 addr = y * 16 + x ' Bereken adres. I2C Write addr, 0, 1, &H00 ' Schrijf nul naar dat adres If MM.I2C = 0 Then ' Controleer op fouten. If addr = 0 Then Print "-- "; ' Addr is 00 dan "-- " If addr > 0 Then Print Hex$(addr, 2);" "; ' Een gevonden! 2=cijfers Else Print "-- "; ' Niets hier.. EndIf Next x Next y End > option list PicoMite MMBasic Version 5.07.07b5 OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP4,GP5 OPTION COLOURCODE ON OPTION DISPLAY 42, 90 OPTION LCDPANEL SSD1306I2C, LANDSCAPE OPTION SDCARD GP22 OPTION RTC AUTO ENABLE Sorry for Dutch. I translate most of the time because my English is not very good and "Translate" is my best friend and the actual code is English. For example, I translated the PicoMite Basic manual into Dutch for myself with many examples and additions. (>360 pages so far) and also the PIO course by Volhout (172 pages) Jan Volk |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 5119 |
Welcome to the forum. Your English is much better than my Dutch! You need to define the temp variable before using it. dim temp After that, your code runs on the latest beta firmware. Jim VK7JH MMedit MMBasic Help |
||||
Pluto Senior Member ![]() Joined: 09/06/2017 Location: FinlandPosts: 181 |
This happens after running Volhout's Logic Analyzer. >files Error : Not enough memory > option list The same as Volhout also pointed out in an earlier post. Was this something that you also wanted to address in the latest update? I just updated the firmware to the latest version (Option list says b12; download says b11). https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip PicoMiteVGA MMBasic Version 5.07.07b12 OPTION FLASH SIZE 4194304 OPTION COLOURCODE ON OPTION KEYBOARD IT OPTION CPUSPEED (KHz) 378000 OPTION DEFAULT MODE 2 OPTION DISPLAY 60, 106 OPTION DEFAULT FONT 7, 1 > /Pluto |
||||
JanVolk Newbie ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 4 |
Jim, I tried with Dim temp and the first time it worked, but by re-running several times I get an error and reset the program and even ** panic ** Edit no longer works. Can only be fixed by re-flashing program, but problem in firmware is still present. Previously temp was probably automatically declared? JanVolk |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3034 |
What happens if you go back to an old MMBasic? Does it then work? John |
||||
JanVolk Newbie ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 4 |
John, See my first post. With PicoMite MMBasic version V5.07.07b5 everything worked fine. Then the problems started. Raspberry Pi Pico is my first microcontroller with MMBasic and have been using it for a year now. JanVolk |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 6828 |
Will fix in next beta |
||||
JanVolk Newbie ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 4 |
Matherp, Thank you in advance. |
||||
![]() ![]() |
![]() |