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: Strange Timer behaviour
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3807 |
In my bid to do odd things I did this: > 480MHz Colour Maximite 2 G2 MMBasic Version 5.07.02b1 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather > list "strange_timer.bas" For i = 0 To 200 Step 10 Timer = i : Print i, Timer Next > run "strange_timer.bas" 0 0.031 10 10.03 20 20.029 30 30.029 40 40.03 50 50.03 60 60.029 70 54.494 80 64.496 90 74.494 100 134.504 110 144.504 120 104.504 130 114.504 140 108.968 150 168.968 160 178.968 170 188.968 180 198.968 190 158.97 200 203.432 If it isn't a bug then I'm sure the explanation will be interesting. Best wishes, Tom Edited 2021-10-22 04:19 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1124 |
I suspect it must be a case of chroniton fluctuation. Regards Michael |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3807 |
In that case we better reverse the polarity of the neutron stream . Tom Edited 2021-10-22 04:41 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1124 |
Or you change your place of residence if you live too near to Sellafield ... |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3807 |
But then how would I get that healthy glow ? Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1124 |
I hope Peter can help you! ... or the White Wizard? BTW: is he still online? It's been a long time since I've seen him. Edited 2021-10-22 05:15 by twofingers |
||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 323 |
Overclocking doesn't change the time warp: 504MHz Colour Maximite 2 G2 MMBasic Version 5.07.01 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather > run 0 0.03 10 10.029 20 20.029 30 30.029 40 40.028 50 50.028 60 60.028 70 54.493 80 64.493 90 74.492 100 134.503 110 144.503 120 104.504 130 114.504 140 108.967 150 168.967 160 178.967 170 188.968 180 198.967 190 158.967 200 203.431 |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8517 |
Definitely a bug but not in my code I set a timer register to x with the timer stopped and then read it back and it is not x I'll work on it more tomorrow but currently looks very strange |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8517 |
Except for the bug in my code Was __HAL_TIM_SET_COUNTER(&htim16, (uint16_t)t % 50000); Should be __HAL_TIM_SET_COUNTER(&htim16, (uint16_t)(t % 50000)); |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5648 |
It was only a matter of time... So what's a parenthesis between friends? :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3807 |
Thanks Peter that has resolved the issue for me. I've always found that declaring that "it definitely isn't a bug in my code" is always a great way of outfoxing the little buggers and getting them to reveal themselves - I'm sure that's what you were doing too . Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
[groan] |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5648 |
I wondered if it would be you or Tom that groaned first. :) Sings: "Lets do the Time Warp again..." Yay! Just unpacked a parcel - my FPGA board and programmer have arrived. :) Edited 2021-10-23 19:26 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
"It's astounding...time is fleeting...madness takes control" My favourite Used to attend the Saturday night, midnight RHPS...great times Happy New toys Look forward to sharing the adventure |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3807 |
That would be a bit rich given the subject of the thread. (It annoys me no end that I let a typo slip through.) Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 323 |
https://www.youtube.com/watch?v=_J6-3l3hCm0 Edited 2021-10-23 20:23 by toml_12953 |
||||
Print this page |