Why is it so!
2005-03-19 by John Samperi
G'day
We I finally got my updated board with the M64 on
Friday. Put it together and got it running with some
simple code, USART0 and USART1 talking to 2 terminals
and the mandatory flashing led. The led uses timer
overflow 1 (4.095ms) and a register dec from 127 to
give about .5 sec flashes in the int routine. The code
was ported from another app using the m8. Here is the
strange part. The led would flash 3 times correctly,
the 4th ON time was about twice as long, it would then
flash 5 times correctly, the 6th OFF time was about
twice as long, it would then flash 6 times correctly,
the 7th OFF time was about twice as long. It would then
repeat the sequence! For 2 days!
This morning (+-6am) I felt the need for a jtagice
(nope not expecting) but being Sunday morning no chance
of getting one in a hurry...unless..look up bootleg info
about jtagice, adatpt one of my DXIO-6 module which uses
M8535 (pin compatible with m16) some veroboard and some
connectors and voila, instant jtagice //BRAG MODE ON//
It worked first go!//BRAG MODE still ON// :-)
Meanwhile back at the range...something happened by enabling
disabling OCD and JTAG on the M64. The LED now flashes correctly
even without jtag or programmer plugged in i.e. as it should.
The question remains: Why is it so! Why is the timer now working
as it should? Anyone has any ideas? No I haven't changed anything
in the code, just played around with the 'fully working' jtag.
By the way Dave, I learned from your problems with the Int vectors
last week and copied and pasted them directly from the M64 PDF
into my code. :-))
Regards
John Samperi
******************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495 Fax (02) 9674-8745
Email: samperi@ampertronics.com.au
Website http://www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
******************************************************