plasmo wrote:
So I tried 3.68MHz and see the sign-on message at 14400 bps. Then I tried 14.7MHz and see the same sign-on at 57600 bps, then I tried 16MHz and see somewhat corrupted sign-on at 57600 (16MHz translate to 62700bps, about 8.8% error from 57600, so that's about right). It won't boot at 18.432MHz. So I guess the top frequency running with internal flash is about 16MHz.
Bill
Good to see one going, but ... Hm. Odd.
At boot-time the internal ROM tries to calculate the main clock speed then uses a look-up table to set the baud rate. It knows about these speeds:
Code:
558 00:0086 SPEED .ds 1 ;MAIN XTAL SPEED
559 ;0 = 2.000000MHZ
560 ;1 = 4.000000MHZ
561 ;2 = 2.457600MHZ
562 ;3 = 3.686400MHZ
563 ;4 = 1.843200MHZ
564 ;5 = 4.914 MHZ
Any xtal speed outside this will/should result in garbage... But it's most odd that you get 14400 with the 3.6864 Mhz oscillator.
The code sets a timer going on the 32K crystal then runs software loop and uses the count from the loop to index a table with a set of pre-computed values for the loop time it then uses this idex to get one of those values which is then uses to index into a set of tables to get the values to put into the timer that controls the ACIA.
If it doesn't find a match then it assumes it has a 2.4576 Mhz crystal.
That may explain why you get 14400 baud - that's 1.5 * 9600 and 2.4576 * 1.5 is 3.6864 so somehow it's not able to detect the frequency and defaulting to speed 2.
The 32K xtal you have - is it actually running? I don't see the load resistors or capacitors there... It must be doing something as it's required to boot the internal ROM, but at what frequency?
Cheers,
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/