![]() |
Forum Index : Microcontroller and PC projects : Micromite 5.1 Firmware Update
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Yes he could or even change to a 20mS update rate. Anyway, we will see what Kon says. Geoff Graham - http://geoffg.net |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Geoff, I can confirm that the test without the timer reset works fine as 4.7 before. There are still these occasional glitches when updating the timer half way though a period that has already started. As you suggested in your email, probably the only way to make the servos reliably update every time, is to update only at the beginning of a period. http://rittle.org -------------- |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
The problem with updating the compare register at the beginning of the period is that the SERVO command may have to wait for up to 20mS and that is a long time which in turn will cause other issues. It would, for example, break your program. The cause of all this trouble is that you are updating the servo setting too rapidly. I can think of three solutions that you might want to investigate: 1/ In BASIC you could check the timer count (using PEEK) before using the SERVO command. 2/ You could set a timer (using SETTICK) to 20mS immediately after the first use of the SERVO command. Because the BASIC timer and the servo timer use the same clock the tick interrupt will always occur just after the servo timer reaches zero. 3/ You could connect the servo output to a spare I/O pin and set an interrupt on the rising edge which indicates that the servo timer has just reached zero. Geoff Geoff Graham - http://geoffg.net |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Thanks Geoff, I will try with the first one for now. Can you please tell me the PEEK address that I need to be checking? Is it the TIMER1 counter? http://rittle.org -------------- |
||||
Lightrock Newbie ![]() Joined: 19/05/2014 Location: AustraliaPosts: 26 |
Geoff - possible edit for Micromite Plus Advanced Features Manual for V5.1. Page 4 Additional LCD Panel Features - end of first paragraph is '-- on the s.'. Should this be '-- on the screen.'? |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Yes, you are right. Thanks Roy, much appreciated. Geoff Geoff Graham - http://geoffg.net |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2428 |
would it not be possible to change the way the SERVO command works so that when a new pulse width is set, the new value is buffered and the servo timer only updated on the next 'cycle'? this would mean that rapid calls to SERVO would cause the buffered value to be overwritten before it is actually used. cheers, rob :-) |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Brilliant minds think alike !!!! As it happens I have already sent Kon a test version using exactly that mechanism. He will be able to test it after the weekend. Geoff Geoff Graham - http://geoffg.net |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Based on the initial tests which I had this morning, it looks like the servos have been nailed down this time and are very reliable now. Thank you Geoff! http://rittle.org -------------- |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Great, that will go into the next version. Geoff Graham - http://geoffg.net |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1573 |
Hi Geoff, respectfully I want to propose two minor corrections about the user manual v5.1. 1. In the command list (p.61) I miss the LINE command for the LCD panel. ![]() This command is already described at p.21. LINE X1, Y1, X2, Y2, LW, C
Draws a line starting at X1 and Y1 and ending at X2 and Y2. LW is the line’s width and is only valid for horizontal or vertical lines. It defaults to 1 if not specified or if the line is a diagonal. 2. In Appendix D – SPI Communications Here are references to a SPI2 (p.91/2). ![]() I thing this is maybe wrong for standard Micromites (MX170/28)? I can not find a SPI2 channel. Maybe this applies to the MM+ (I think so!)? A remark would be helpful. I know there is a way to create more than one SPI channel (CFunction). Regards Michael causality ≠correlation ≠coincidence |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Thanks Michael. I will put the changes into the manual for the next version. Geoff Geoff Graham - http://geoffg.net |
||||
paceman Guru ![]() Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
Geoff, A couple more minor edits for the 5.1 Manual. 1. CPU command is entered twice in the navigation box - second entry should be CPU RESTART. 2. In the description of the TEXT command there's no information about how to format text obtained from a variable. How about after, "'text$' is a string containing the text to write to the LCD display.",adding "'text$' can be formatted via the STR$ function. For example: LCD 2,4,STR$(mins,2,0,"0")+":"+STR$(secs,2,0,"0") will result in the formatted display 05:15 at line 2, position 4 for mins=5 and secs=15. Greg |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Thanks Greg, much appreciated. Geoff Graham - http://geoffg.net |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1573 |
Hi Geoff, BTW maybe you can correct this too? User Manual p.63 COLOURCODE = COLORCODE or COLOURCODE! I hope this is not annoying for you! Regards Michael causality ≠correlation ≠coincidence |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Thanks Michael. Not at all, this detailed proofreading is excellent. Thanks. Geoff Geoff Graham - http://geoffg.net |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
@Geoffg While we're at it; MicroMite Plus Manual, Page 8, 100pinner diagram. Pin 100 is shown as '10' (but guess this maybe due to only having 2 character spaces) The above is trivial; but another step towards 'User-Manual perfection'!!! . . . . . |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
Thanks Phil, that was caused by the last zero wrapping to the next line. I will fix it. Geoff Graham - http://geoffg.net |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
@Geoffg Regarding the Plus manual and the ILI9341 TFTs; in the Plus manual you refer the user to look at the 'standard' User Manual for how to use the ILI9341. On Page17 you have a nice diagram for the 28pin and 44pin connections (to the TFT). But there is no reference to how to connect to 64pin and 100pinners. Can I suggest you do a diagram like that on Page 17 and insert it into the Plus manual (obviously listing just the 64pin and 100 pin MMs). Then refer user to Standard manual for 'how to configure/use' I have a funny feeling something has been mentioned before about the ILI so apologies if already done ![]() EDIT: Just seen on Page 11 ![]() ![]() ![]() Therefore I suggest just adding a one liner under the ILI9341 heading saying 'see table below for connections' ![]() |
||||
jwaldha Newbie ![]() Joined: 14/01/2016 Location: HungaryPosts: 10 |
Missing 1 second. If using "CPU SLEEP seconds" command after the wake up, the TIMER is updated, but the new value is less than expected. About 1 second is missing: > ? timer : cpu sleep 1 : ? timer 23533 23535 > ? timer : cpu sleep 2 : ? timer 38963 39989 > ? 39989-38963 1026 I searched the reason of this anomaly in the source files, and found this in the MM_Misc.c (from line 378): i = (getint(p, 1, 999999) * 1000) / 1024; INTDisableInterrupts(); mSecTimer += i * 1024; I think, that this is solve the problem: i = getint(p, 1, 999999); INTDisableInterrupts(); mSecTimer += i*1000; i = (i * 1000) / 1024; --- JWaldha |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |