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 : CMM2: Bug reports
Page 16 of 17 | |||||
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8578 |
Better workround circle 400,300,100,100,1,rgb(black) |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1082 |
Fascinating. If the line and fill colours are BLACK, the entire circle disappears. If the line colour is BLACK and the fill colour is, for example, RED, the fill appears but the circle itself doesn't. If the line colour is, for example, BLUE and the fill is BLACK, you get a solid blue circle. (Above tested with a thicker line weight of 10) Visit Vegipete's *Mite Library for cool programs. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8578 |
Just a simple if(fill>0) which should have been if(fill>=0), code for no fill being -1 and because the border is the same colour as the fill the firmware optimises out the border Edited 2020-06-20 07:40 by matherp |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
I made a total balls up with my testing. I will start again with things connected to the right pin and report later. Jim VK7JH MMedit  MMBasic Help |
||||
GregZone Senior Member Joined: 22/05/2020 Location: New ZealandPosts: 114 |
But pin 40 is the correct pin in question? ie. PB13, based on the schematic. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
Yes but I didn't have pin 40 connected. This makes more sense. 250mm of IDE cable to a breadboard. I measured about 30pF A short turn-on pulse then 15-20 mS later, the test starts. Pin 40 pulled high for 300mS If the reset button is pressed, the initial 15-20 mS delay is eliminated. Add 33pF to the mix no visible difference I had to go to 0.22uF before there was something worth looking at Every thing is fully settled down by 50mS at worst. Sorry about the earlier mess. I lay awake last night, knowing that something was not right. Jim VK7JH MMedit  MMBasic Help |
||||
KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1356 |
Programming with the Colour Maximite 2: The colours that you can specify this way are red, green, blue, yellow, cyan, purple, brown, gray, white and black. PIXEL 400, 300, RGB(purple) Error: Invalid colour purple Edited 2020-06-20 09:46 by KeepIS It's all too hard. Mike. |
||||
GregZone Senior Member Joined: 22/05/2020 Location: New ZealandPosts: 114 |
The colours that you can specify this way are red, green, blue, yellow, cyan, purple, brown, gray, white and black. PIXEL 400, 300, RGB(purple) Error: Invalid colour purple Just tried this random guess, and it worked (ie. Magenta instead of Purple) > PIXEL 400, 300, RGB(purple) Error: Invalid colour: PURPLE > PIXEL 400, 300, RGB(MAGENTA) > |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
"Magenta is the new purple." I think purple is a leftover from the CMM1 Jim VK7JH MMedit  MMBasic Help |
||||
GregZone Senior Member Joined: 22/05/2020 Location: New ZealandPosts: 114 |
Please can you try fitting a power switch to the PCB, just a normal switch on a flying lead will do, set the SD timing to normal and switch on the board with the switch and see what happens. Hi Peter, So this morning I've removed the CG installed power jumper, and replaced with an (as intended) nice snap action PCB toggle switch. I've done some repeated testing, but it appears that a good Power Switch (instead of just inserting USB connector) makes no difference to the SD Card issues. On reflection, I'm not overly surprised by the switch making no difference, given that the power switch simply issolates the entire board from the USB 5V pin. Along with the 10uf capacitor on this power feed, I wouldn't really expect any dirty power issues from a USB plug-in power-up. For clarity on the SD Card OPTION change from CONSERVATIVE to NORMAL not impacting the SD Card accessibility until after a power cycle, here is the log: 1. Initial power-up with SD Card in CONSERVATIVE mode (and working), then timing changed to NORMAL (and still working): > Colour Maximite 2 MMBasic Version 5.05.03b1s Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > OPTION LIST OPTION DISPLAY 50,100 OPTION USBKEYBOARD US OPTION SD TIMING CONSERVATIVE CURRENT VGA mode 800x600 RGB332 > ?MM.INFO$(SDCARD) Ready > OPTION SD TIMING NORMAL > OPTION LIST OPTION DISPLAY 50,100 OPTION USBKEYBOARD US CURRENT VGA mode 800x600 RGB332 > ?MM.INFO$(SDCARD) Ready 2. Next, I press the Reset button on the Waveshare board, and check OPTION LIST still confirms we are NORMAL timing. ie. SD Card is still working (after Reset): > Colour Maximite 2 MMBasic Version 5.05.03b1s Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > OPTION LIST OPTION DISPLAY 50,100 OPTION USBKEYBOARD US CURRENT VGA mode 800x600 RGB332 > ?MM.INFO$(SDCARD) Ready 3. Finally, I then switch Off then back On (using toggle switch!), and check OPTION LIST again. SD Card now has "Check Disk" / reports as Unused. ie. the NORMAL timing change (which isn't working with any of my SD Cards) didn't appear to take effect until after a power cycle: > Colour Maximite 2 MMBasic Version 5.05.03b1s Copyright 2011-2020 Geoff Graham Copyright 2016-2020 Peter Mather > OPTION LIST OPTION DISPLAY 50,100 OPTION USBKEYBOARD US CURRENT VGA mode 800x600 RGB332 > ?MM.INFO$(SDCARD) Unused > Just another strange anomaly? Or possibly a clue to what might be causing the SD Card compatibility issue? |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
What happens if after step 2, you remove and reinsert the SDcard instead of power cycling. This should re-run the initialization code (at the NORMAL settings) Jim VK7JH MMedit  MMBasic Help |
||||
GregZone Senior Member Joined: 22/05/2020 Location: New ZealandPosts: 114 |
This should re-run the initialization code (at the NORMAL settings) Jim Okay, so as you've suggested I repeated the above sequence, but this time replacing step 3. with a SD Card eject / re-insert (instead of the power cycle): > OPTION LIST OPTION DISPLAY 50,100 OPTION USBKEYBOARD US CURRENT VGA mode 800x600 RGB332 > ?MM.INFO$(SDCARD) Unused > And, Yes, you are correct. The SD Card is now "Check Disk" / no longer working after the eject / re-insert. So, in summary, after changing to NORMAL timing, this appears to be only taking effect (and causing my SD Card to fail), after either a power cycle or a SD Card eject. Whereas a timing change to CONSERVATIVE has an immediate effect on making the inserted SD Card accessible. |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2286 |
I've done some repeated testing, but it appears that a good Power Switch (instead of just inserting USB connector) makes no difference to the SD Card issues. [...] Just another strange anomaly? Or possibly a clue to what might be causing the SD Card compatibility issue? humour me, try with the CMM2 powered from an external 5v source that is NOT from a PC. use a phone charger, bench supply, or something else. cheers, rob :-) |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
So, in summary, after changing to NORMAL timing, this appears to be only taking effect (and causing my SD Card to fail), after either a power cycle or a SD Card eject. Whereas a timing change to CONSERVATIVE has an immediate effect on making the inserted SD Card accessible. The way I read it is. Your setup has trouble initializing cards on the normal setting but no trouble reading at NORMAL speeds once initialized. The cards get initialized on inserting or power-up. They don't get initialized for every read. It 'might' be possible to have a setting that initializes at the conservative rate then switches back to NORMAL. That 'might' be an option if it means many more cards are readable out-of-the-box. There is a significant speed difference between NORMAL and CONSERVATIVE so I wouldn't want to handicap the system without good reason. Just slowing down initialization would be acceptable (if doable). Lots of 'might' there. Jim VK7JH MMedit  MMBasic Help |
||||
GregZone Senior Member Joined: 22/05/2020 Location: New ZealandPosts: 114 |
try with the CMM2 powered from an external 5v source that is NOT from a PC. use a phone charger, bench supply, or something else. cheers, rob :-) No problem. I'd already done this earlier when ruling out any power related issues. But I've just done it again, to be sure, to be sure. :) No difference, as would be reasonably expected given the CMM2 doesn't have a high power requirement. |
||||
GregZone Senior Member Joined: 22/05/2020 Location: New ZealandPosts: 114 |
Your setup has trouble initializing cards on the normal setting but no trouble reading at NORMAL speeds once initialized. Okay, that seems a reasonable conclusion. Do you know if anyone has written a SD speed test, that I could use to verify performance (before and after reboot)? If not, I assume I'd just need to find the commands to open a file and stream some data to it and measure the time taken. On an interesting new note, after failing NORMAL on my 3 SD Cards that I have to hand (mentioned in earlier post), I just came across a really old 64MB SD Card that I found in an ancient camera. Yes, that is 64MB (not GB). It is so old it is just labeled "SecureDigital Card" with no speed ratings. It is Dick Smith branded. And guess what... It works perfectly at NORMAL setting! This really is bizarre, as we now have the situation where my newer Class 10 & Class 6 cards all require CONSERVATIVE to work. But here I have an ancient and therefore considerably slower 64MB card, that works perfectly on NORMAL setting? This surely must indicate some sort of firmware timing issue at play, perhaps only relevant to my Y varient SoC? Nothing else seems to make sense, given everything we have already ruled out. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
I too have small capacity cards that work. Not all, but many do. It is NOT anything to do with the Y or V variants. If it makes you happy, the system I am using is a Y revision chip. The newer SD cards are trying to squeeze as much data into a small place as possible. This makes then very susceptible to errors. You can get industrial grade cards that cost an arm and a leg and are limited in capacity to about 8GB (If I remember correctly) They are also much slower than the domestic cards. A simple write speed test would be to SAVE IMAGE 10 times to different file names and measure the time taken. For reading, do the reverse. Jim VK7JH MMedit  MMBasic Help |
||||
GregZone Senior Member Joined: 22/05/2020 Location: New ZealandPosts: 114 |
Okay I've just put together my first ever MMBasic program, to do this quick speed test. I'm just writing a 1 million char file and measuring the time taken. On my 32GB ULTRA Class 10 card the results show approx 3450ms in CONSERVATIVE, then after changing to NORMAL (but while still working / not re-powering or ejecting), I get approx 3100ms. So only about a 10% speed improvement on NORMAL? Not that dramatic. Here's the log: > option list OPTION DISPLAY 50,100 OPTION USBKEYBOARD US OPTION SD TIMING CONSERVATIVE CURRENT VGA mode 800x600 RGB332 > list timer = 0 open "data.txt" for output as #1 for lp = 1 to 100000 print #1,"01234567" next lp close #1 print timer "ms" > option list OPTION DISPLAY 50,100 OPTION USBKEYBOARD US OPTION SD TIMING CONSERVATIVE CURRENT VGA mode 800x600 RGB332 > run 3479.639ms > run 3443.377ms > OPTION SD TIMING NORMAL > run 3095.014ms > run 3099.399ms > Interestingly, I then ran the same test on my ancient slow? 64MB SD Card, and I got: > OPTION SD TIMING NORMAL > run 2485.093ms > OPTION SD TIMING CONSERVATIVE > run 2867.658ms > So, again, only just over 10% faster on NORMAL. But, interestingly, this old slow 64MB card appears to be faster than my new Class 10 32GB Sandisk Ultra! Wow, so much for technical advances. LOL But, might also explain why the old 32MB Card is working fine in NORMAL timing? |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8578 |
Its not for various technical reasons - spent hours on this yesterday They also get initialised on reset but clearly they are in a different state compared to a power cycle or re-insertion Whereas a timing change to CONSERVATIVE has an immediate effect on making the inserted SD Card accessible. As I've explained this is not true, they both take effect immediately. It is the state of the card that is different search the forum for "tain.txt" There is a good benchmark that someone wrote that I use for all SD testing - it takes a long time to run though Overall speed is significantly impacted by how much data and how many files are on the card. For a true test cards need to be re-formatted before any test Edited 2020-06-20 17:36 by matherp |
||||
Chopperp Guru Joined: 03/01/2018 Location: AustraliaPosts: 1032 |
For what it is worth, I took my SD Card off of CONSERVATIVE for fun. Tested whole heap of cards mainly 4GB & below, but one 32Gb. All worked apart from one 512MB onewhich obviously was stuffed. None were working a week or two ago. Brian ChopperP |
||||
Page 16 of 17 |
Print this page |