Re: RS-232 on VIC-20

From: Jim Brain (brain_at_jbrain.com)
Date: 2004-06-21 20:52:29

Christian Johansson wrote:

>----- Original Message ----- 
>From: "MagerValp" <MagerValp@cling.gu.se>
>To: <cbm-hackers@cling.gu.se>
>Sent: Monday, June 21, 2004 7:13 PM
>Subject: Re: RS-232 on VIC-20
>
>
>  
>
>>>>>>>"CJ" == Christian Johansson <c64@comhem.se> writes:
>>>>>>>              
>>>>>>>
>>CJ> Has anybody been able to use the Hug RS-232 routines to get 4800
>>CJ> bps on the C128? I think it should be possible since if it is
>>CJ> possible to achieve 2400 bps on the C64 in 1 MHz with the
>>CJ> routines, it should also be possible to achieve 4800 bps on the
>>CJ> C128 in 2 MHz
>>
>>Well, actually, the biggest problem is badlines - and they're 40 us
>>long even in 2 MHz mode. In 80 column mode with the VIC screen closed
>>it's possible to use 9600 bps though.
>>
>>    
>>
>
>I'm not very familiar with badlines. Does that problem exist even if I blank
>the screen in 40-column mode? Of course, I blank the screen when using the
>40-column mode with 2 MHz because there is not much point in seeing a lot of
>garbage moving across the screen. Anyway, I have tested that it is only
>possible to achieve 2400 bps with the built-in Kernal routines in 2 MHz mode
>and 80-column mode but I know that it is possible to achieve 9600 bps using
>custom routines (and 115200 bps if you stop using interrupts and use code
>like in Over5). What I want to know is if the Hug routine I posted in my
>previous email could perhaps be used to get at least 4800 bps by making some
>small modifications to it. I think it should be enough to change the
>definitions of the bit times but as I wrote I don't understand how they have
>been calculated.
>
>
>       Message was sent through the cbm-hackers mailing list
>  
>
It should be possible, as 4800 bps leaves about 280us per bit.  However, 
I think the Hug routines reload the counter at each IRQ.  If multiple 
badlines occur per byte, then it is possible the sync could be lost.  I 
forget how many badlines there are in a second ( I would assume 25 * 
60..., which means 3-4 badlines per byte...)  but if there are more than 
3, there might be problems, as I think the Hug routines sample mid bit 
time (as in, in the middle of the period when the bit should be valid). 

Jim


-- 
Jim Brain, Brain Innovations
brain@jbrain.com                                http://www.jbrain.com
Dabbling in WWW, Embedded Systems, Old CBM computers, and Good Times!


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.