Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:41 06 Jul 2025 Privacy Policy
Jump to

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 : Micromite 5.1 Firmware Update

     Page 3 of 4    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 10:08pm 27 Jan 2016
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 671
Posted: 03:24am 28 Jan 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3282
Posted: 04:40am 28 Jan 2016
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 671
Posted: 09:24am 28 Jan 2016
Copy link to clipboard 
Print this post

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?Edited by kiiid 2016-01-30
http://rittle.org

--------------
 
Lightrock
Newbie

Joined: 19/05/2014
Location: Australia
Posts: 26
Posted: 02:45am 30 Jan 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3282
Posted: 04:22am 30 Jan 2016
Copy link to clipboard 
Print this post

  Lightrock said  Should this be '-- on the screen.'?

Yes, you are right.

Thanks Roy, much appreciated.

Geoff
Geoff Graham - http://geoffg.net
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2428
Posted: 04:53am 30 Jan 2016
Copy link to clipboard 
Print this post

  Geoffg said  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:
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.


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 :-)Edited by robert.rozee 2016-01-31
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 10:40am 30 Jan 2016
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 671
Posted: 01:03am 01 Feb 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3282
Posted: 01:52am 01 Feb 2016
Copy link to clipboard 
Print this post

Great, that will go into the next version.
Geoff Graham - http://geoffg.net
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1573
Posted: 05:04am 14 Feb 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3282
Posted: 12:24pm 14 Feb 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 1329
Posted: 03:06am 18 Feb 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3282
Posted: 09:10am 18 Feb 2016
Copy link to clipboard 
Print this post

Thanks Greg, much appreciated.
Geoff Graham - http://geoffg.net
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1573
Posted: 11:40am 18 Feb 2016
Copy link to clipboard 
Print this post

Hi Geoff,

BTW maybe you can correct this too? User Manual p.63
  Quote  OPTION COLOURCODE ON
or
OPTION COLOURCODE
OFF

COLOURCODE = COLORCODE or COLOURCODE!

I hope this is not annoying for you!

Regards
Michael
causality ≠ correlation ≠ coincidence
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 01:57am 19 Feb 2016
Copy link to clipboard 
Print this post

Thanks Michael.

  twofingers said  I hope this is not annoying for you!

Not at all, this detailed proofreading is excellent. Thanks.

Geoff
Geoff Graham - http://geoffg.net
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 03:37am 19 Feb 2016
Copy link to clipboard 
Print this post

@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: Australia
Posts: 3282
Posted: 10:07pm 21 Feb 2016
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2932
Posted: 10:19pm 21 Feb 2016
Copy link to clipboard 
Print this post

@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'
Edited by WhiteWizzard 2016-02-23
 
jwaldha
Newbie

Joined: 14/01/2016
Location: Hungary
Posts: 10
Posted: 09:50pm 08 Mar 2016
Copy link to clipboard 
Print this post

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;

Edited by jwaldha 2016-03-18
---
JWaldha
 
     Page 3 of 4    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025