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 : A PicoMite CSUB to timestamp pin changes (Manchester code?)
Page 2 of 2 | |||||
Author | Message | ||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6094 |
Likewise, Thanks Gerry, works perfectly. Jim VK7JH MMedit MMBasic Help |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Tested it with the new PicoMiteVGA MMBasic Version 5.07.05RC1 and got this again:- "Edit 2 Now the immediate mode line editing is not quite right. Pressing the up arrow moves the cursor down to the next line with no ">". Pressing enter runs the last line even though no command is showing. This makes editing a previous line tricky. > ? time$ <----typed time$ enter 09:44:57 > ? time$ <----pressed up arrow <----pressed enter 09:45:11 > Re flashing doesn't fix it, unless the Pico is 'nuked' first." The oddity of not being able to get out of the Interrupt Sub called by it remains. |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Attempted to use CSub LOG on latest firmware but no-go. > RUN Error: Invalid address - resetting > option list PicoMiteVGA MMBasic Version 5.08.00 OPTION SYSTEM I2C GP6,GP7 OPTION COLOURCODE ON OPTION KEYBOARD US OPTION CPUSPEED (KHz) 252000 OPTION DISPLAY 55, 132 OPTION SDCARD GP13, GP10, GP11, GP12 OPTION RTC AUTO ENABLE OPTION COUNT GP2,GP3,GP4,GP5 > |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Did you recompile it from the C? Likely need to... John |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Agreed. Revisiting this was prompted by @Morgs67 needing a Pico version of NECsend CSub, which he was unable to successfully recompile. I have also had no luck recompiling LOG. |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 896 |
Recompiled for 5.08.00 Release. Untested. 'File LOG.bas written 23-01-2024 08:10:57 v1.44 CSUB LOG 00000042 'check_timer B082B580 4B10AF00 3320681B 4B0F607B 4798681B 681A687B 4299685B D10ED803 D8004290 4B0AE00B 2200681B 4B09601A 2200681B 4B08601A 2201681B 46C0701A B00246BD 46C0BD80 10000384 100003A4 10000380 100003C0 100003C8 'intprog B084B580 4B23AF00 60FB681B 681B4B21 60BB3310 681B68FB 68BB607B 1E5A681B 601A68BB 681B68BB DC0B2B00 681B4B1A 601A2200 681B4B19 601A2200 681B4B18 701A2201 681B4B17 47982009 D0081E03 681B4B15 00024798 6879000B 604B600A 4B11E00D 4798681B 000B0002 21002000 41991A80 000B0002 600A6879 68FB604B 3308681B 68FB001A 46C0601A B00446BD 46C0BD80 10000384 10000380 100003C0 100003C8 10000324 100003A4 'main B088B580 60F8AF00 607A60B9 681B4B16 447A4A16 4B16601A 4A16681B 601A447A 681B4B15 4B1461FB 3310681B 4B1261BB 3320681B 68FA617B 601A69FB 681A68BB 69BB685B 4B0D601A 4798681B 000B0002 68086879 18126849 6979414B 604B600A 46BD46C0 BD80B008 100003C0 FFFFFF3F 10000380 FFFFFED9 10000384 100003A4 End CSUB Latest F4 Latest H7 |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Thank you, that is perfect. Reading data stream from a DHT11 nicely. Now to try on an IR remote. Edit. Yes, it reads the IR stream too. However the data rate is low enough to read just with MMBasic code. Edited 2024-01-28 16:49 by phil99 |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Edit. Oops, wrong thread!NECsend Sub Edited 2024-02-10 20:32 by phil99 |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 896 |
LOG CSUB recompiled for MMBasic 6.00.00RC15 PICO RP2040 and PICO2 RP2350 have different versions. Untested. 'File LOG.bas written 11-11-2024 11:31:57 v1.44 'PICO2 RF2350 v6.00.00 RC15 CSUB LOG 00000042 'check_timer B082B580 4B0FAF00 3320681B 4B0E607B 4798681B E9D3687B 42822300 D20D418B 681B4B0A 2300461A 4B096013 461A681B 60132300 681B4B07 701A2201 3708BF00 BD8046BD 100002B8 100002D8 100002B4 100002F4 100002FC 'intprog B084B5B0 4B24AF00 60FB681B 681B4B22 60BB3310 681B68FB 68BB607B 1E5A681B 601A68BB 681B68BB DC0D2B00 681B4B1B 2300461A 4B1A6013 461A681B 60132300 681B4B18 701A2201 681B4B17 47982009 2B004603 4B15D008 4798681B 460B4602 E9C16879 E00D2300 681B4B10 46024798 2100460B EB614254 68790503 462B4622 2300E9C1 681B68FB 0208F103 601A68FB 3710BF00 BDB046BD 100002B8 100002B4 100002F4 100002FC 10000258 100002D8 'main B088B5B0 60F8AF00 607A60B9 681B4B17 447A4A1A 4B16601A 4A19681B 601A447A 681B4B14 4B1361FB 3310681B 4B1161BB 3320681B 68FA617B 601A69FB E9D368BB 69BB2300 4B0C601A 4798681B 460B4602 E9D16879 18140100 0501EB43 E9C3697B BF004500 46BD3720 BF00BDB0 100002F4 100002B4 100002B8 100002D8 FFFFFF3B FFFFFED9 End CSUB 'File LOG.bas written 11-11-2024 11:38:50 v1.44 'PICO RP2040 v6.00.00 RC15 CSUB LOG 00000042 'check_timer B082B580 4B10AF00 3320681B 4B0F607B 4798681B 681A687B 4299685B D10ED803 D8004290 4B0AE00B 2200681B 4B09601A 2200681B 4B08601A 2201681B 46C0701A B00246BD 46C0BD80 100002B8 100002D8 100002B4 100002F4 100002FC 'intprog B084B580 4B23AF00 60FB681B 681B4B21 60BB3310 681B68FB 68BB607B 1E5A681B 601A68BB 681B68BB DC0B2B00 681B4B1A 601A2200 681B4B19 601A2200 681B4B18 701A2201 681B4B17 47982009 D0081E03 681B4B15 00024798 6879000B 604B600A 4B11E00D 4798681B 000B0002 21002000 41991A80 000B0002 600A6879 68FB604B 3308681B 68FB001A 46C0601A B00446BD 46C0BD80 100002B8 100002B4 100002F4 100002FC 10000258 100002D8 'main B088B580 60F8AF00 607A60B9 681B4B16 447A4A16 4B16601A 4A16681B 601A447A 681B4B15 4B1461FB 3310681B 4B1261BB 3320681B 68FA617B 601A69FB 681A68BB 69BB685B 4B0D601A 4798681B 000B0002 68086879 18126849 6979414B 604B600A 46BD46C0 BD80B008 100002F4 FFFFFF3F 100002B4 FFFFFED9 100002B8 100002D8 End CSUB Latest F4 Latest H7 |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Thanks Gerry, currently testing the RP2350 version and it is perfect. |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Tested RP2040 version on the same test program as used for the RP2350 version. > RUN Also tried it on a RP2040 WebMite, same result.Error: Invalid address - resetting > Test program. PWM output on pin GP0 linked to Count input on GP6. ' "Pico1 CSUB LOG test for RP2040.bas" Dim a%(84) 'array to receive the timestamps Dim b%=84 'maximum number of transitions to receive Dim c%=20000 'timeout of the CSUB in microseconds SetPin gp0, PWM 'Create a pulse stream, 100uS high, 300uS low. Link GP0 to GP6 PWM 0, 2500, 25 SetTick 3000, Test Do : Loop Sub Test i=0 : a%(81)=0 SetPin gp6,cin,3 'set pin 9 (GP6) to cause a H/W interrupt on both edges log a%(),b%,c% 'initialise the logging Print "waiting for LOG to fill a%()" Do While (a%(81)=0) :Loop 'loop until enough transitions recorded Do While a%(i) 'read all valid data Print a%(i)+a%(i+1), a%(i+1)+a%(i+2) Inc i,2 'increment the loop counter Loop End Sub ' This CSUB logs activity on GP6, each transition of the pin is ' logged to the nearest microsecond. The timestamp is positive for positive ' going transitions and negated for negative going ones 'File LOG.bas written 11-11-2024 11:38:50 v1.44 'PICO RP2040 v6.00.00 RC15 CSUB LOG 00000042 'check_timer B082B580 4B10AF00 3320681B 4B0F607B 4798681B 681A687B 4299685B D10ED803 D8004290 4B0AE00B 2200681B 4B09601A 2200681B 4B08601A 2201681B 46C0701A B00246BD 46C0BD80 100002B8 100002D8 100002B4 100002F4 100002FC 'intprog B084B580 4B23AF00 60FB681B 681B4B21 60BB3310 681B68FB 68BB607B 1E5A681B 601A68BB 681B68BB DC0B2B00 681B4B1A 601A2200 681B4B19 601A2200 681B4B18 701A2201 681B4B17 47982009 D0081E03 681B4B15 00024798 6879000B 604B600A 4B11E00D 4798681B 000B0002 21002000 41991A80 000B0002 600A6879 68FB604B 3308681B 68FB001A 46C0601A B00446BD 46C0BD80 100002B8 100002B4 100002F4 100002FC 10000258 100002D8 'main B088B580 60F8AF00 607A60B9 681B4B16 447A4A16 4B16601A 4A16681B 601A447A 681B4B15 4B1461FB 3310681B 4B1261BB 3320681B 68FA617B 601A69FB 681A68BB 69BB685B 4B0D601A 4798681B 000B0002 68086879 18126849 6979414B 604B600A 46BD46C0 BD80B008 100002F4 FFFFFF3F 100002B4 FFFFFED9 100002B8 100002D8 End CSUB Edited 2024-11-12 10:13 by phil99 |
||||
Page 2 of 2 |
Print this page |