[comp.sys.apple2] //c serial ports.

pgc@csadfa.cs.adfa.oz.au (Phil Clark) (03/26/91)

I seem to remember reading somewhere, possibly in this newsgroup, that
Applesoft basic has problems keeping up with data via the serial ports of
a //c at greater than about 1200 baud. 

Does anyone know if this is true?

I have a problem trying to input a data string into a basic program via
serial port 2 at 4800 baud. I realy did not want to resort to a machine
language sub-routine for a simple function unless necessary, but it seems 
as if the input statement in basic cannot handle the data at this rate.

Has anyone else experienced this problem and if so, is there a simple
answer?

Incidentally, a PC or compatible or a dumb terminal has no problem handling
the data string and the baud rate of the input cannot be changed.

The data format is 8 data bits, no parity, 2 stop bits, 4800 baud.

Thanks,


Phil Clark [VK1PC]         Department of Computer Science,     Phone: 
                           Australian Defence Force Academy,   +61 6 268 8157
Email:                     Northcott Drive, Campbell,          Fax:
pgc@csadfa.cs.adfa.oz.au   Canberra, Australia, 2600.          +61 6 268 8581

a.guillaume@trl.oz.au (andrew guillaume) (03/27/91)

In article <1991Mar26.043509.24160@sserve.cc.adfa.oz.au>,
pgc@csadfa.cs.adfa.oz.au (Phil Clark) writes:
> I seem to remember reading somewhere, possibly in this newsgroup, that
> Applesoft basic has problems keeping up with data via the serial ports of
> a //c at greater than about 1200 baud. 

> Has anyone else experienced this problem and if so, is there a simple
> answer?

> The data format is 8 data bits, no parity, 2 stop bits, 4800 baud.

G'day !

I have had similar problems, at 1200 baud. Data format : 8 bits, no parity,
1 stop bit, 1200 baud. I was using Visiterm (a comms program), hooked up
directly to my unix box, to download text. At 1200 baud, I would loose a
character ot two every time the Apple //c would send a stop character to
write to disk. No problems at 300 baud. I was wondering whether this was 
a software problem or whether that was linked to the serial port. 
Theoretically, the //c port can go up to 19.2k baud. So says the tech
manual.

I would also appreciate if someone could shed light on this, and give
an indication as to whether the problem disappears with an upgrade (I have
to upgrade my //c from a "boat anchor" :-) to a unidisk in order to be able
to buy a Chinook HD). Thanks in advance.

Andrew Guillaume

Internet : a.guillaume@trl.oz.au

jdeitch@umiami.ir.miami.edu (Jonathan Deitch) (03/27/91)

In article <7175@munnari.oz.au>, a.guillaume@trl.oz.au (andrew guillaume) writes:
> 
> In article <1991Mar26.043509.24160@sserve.cc.adfa.oz.au>,
> pgc@csadfa.cs.adfa.oz.au (Phil Clark) writes:
>> I seem to remember reading somewhere, possibly in this newsgroup, that
>> Applesoft basic has problems keeping up with data via the serial ports of
>> a //c at greater than about 1200 baud. 
> 
>> Has anyone else experienced this problem and if so, is there a simple
>> answer?
> 
>> The data format is 8 data bits, no parity, 2 stop bits, 4800 baud.
> 
> G'day !
> 
> I have had similar problems, at 1200 baud. Data format : 8 bits, no parity,
> 1 stop bit, 1200 baud. I was using Visiterm (a comms program), hooked up
> directly to my unix box, to download text. At 1200 baud, I would loose a
> character ot two every time the Apple //c would send a stop character to
> write to disk. No problems at 300 baud. I was wondering whether this was 
> a software problem or whether that was linked to the serial port. 
> Theoretically, the //c port can go up to 19.2k baud. So says the tech
> manual.
> 
> I would also appreciate if someone could shed light on this, and give
> an indication as to whether the problem disappears with an upgrade (I have
> to upgrade my //c from a "boat anchor" :-) to a unidisk in order to be able
> to buy a Chinook HD). Thanks in advance.
> 
> Andrew Guillaume
> 
> Internet : a.guillaume@trl.oz.au

On the "Boat Anchor" //c, Apple had some design problems with the serial ports.

It seems that they tried to derive the timing signal for the serial ports from
the 14.8 mhz master timing clock.  What they got was very close but not exact
to what the 6551 serial chips expect.  End result : garbled text and serial
communications problems.  This is fixed with later versions.

Here's how to tell which version you have : take your //c apart and see if
there is a silver TTL clock generator in the row of chips next to the power
supply.  If so, you shouldn't have any problems.  If not so (the third back is
a 74LS161) than you should be able to get a free motherboard upgrade from your
friendly Apple dealer.  BTW : they sometimes will give you the Unidisk 3.5"
motherboard as this upgrade for nothing extra.

Good Luck to all !

- Jonathan
 
------------------------------------------------------------------------------
Internet : jdeitch@umiami.miami.edu               | "Good musicians execute
------------------------------------------------- |  their music but bad ones
"I'm a Time Lord.  I walk in eternity !" - Dr Who |  murder it !!! "

edwatkeys@pro-sol.cts.com (Ed Watkeys) (03/27/91)

In-Reply-To: message from pgc@csadfa.cs.adfa.oz.au

I'm not sure about this stuff, so if anyone corrects me, trust them...

There are a few issues that we're dealing with at the same time.  First of
all, when APple first put out the IIc, there was a timing problem with the
serial ports (they used the system clock and divided it down, to the
correct frequency, but it wasn't totallt 'correct',, if I recall).  What it
caused was data errors at speeds of 1200 ps and higher.  The solution, go
to your Apple dealer and ask him to check the serial number, and replace
the motherboard (for free, really) if it is old enough.  I had to have one
of my IIcs upgraded, and it had a sn of D4B0105.

OK, now BASIC...  at 2400bps, there could be a character coming every
4.17E-3 seconds, which means, basically, faster than BASI can handle.  Note
that GETLN is written in ML, and can handle stuff at a pretty fast rate.  I
think the problem could come when you get sent a string, a CR and then
another string.  It will take the first string okay (provided that you're
waiting for it), get the CR, and go to the next BASIC statement.  While
BASIC is picking its nose, the next line of characters is screaming by. 
For BBSs, this is not a problem, because most of us aren't *that* fast as
typers.  The only solution (the simplest) is to write the ML routines.  You
could get into interrupts and all that, but between you and I, Apple never
really told us how to use serial interrupts with ProDOS (they did in the
IIc Tech Ref, but there are a few fatal typos, and it didn't deal with
ProDOS...)  One other possibility is to talk to MDAVIS at the site where I
am, and ask him about ModemWorks.  Tell him what you need, and what you
don't, and the fact that you have a IIc, and he'll tell you if ModemWorks
will do the job for you...

Edwin Howell Watkeys III

Internet: edwatkeys@pro-sol.cts.com  ProLine:  edwatkeys@pro-sol
UUCP:     crash!pro-sol!edwatkeys    ARPA:     crash!pro-sol!edwatkeys@nosc.mil
BitNET:   edwatkeys%pro-sol.cts.com@nosc.mil

pgc@csadfa.cs.adfa.oz.au (Phil Clark) (03/28/91)

From article <1991Mar26.191258.8367@umiami.ir.miami.edu>, by jdeitch@umiami.ir.miami.edu (Jonathan Deitch):
> In article <7175@munnari.oz.au>, a.guillaume@trl.oz.au (andrew guillaume) writes:
>> 
>> In article <1991Mar26.043509.24160@sserve.cc.adfa.oz.au>,
>> pgc@csadfa.cs.adfa.oz.au (Phil Clark) writes:
>>> I seem to remember reading somewhere, possibly in this newsgroup, that
>>> Applesoft basic has problems keeping up with data via the serial ports of
>>> a //c at greater than about 1200 baud. 

         (Lots & lots of unnecessary deleted!)


> On the "Boat Anchor" //c, Apple had some design problems with the serial ports

                   (more lots deleted)

>BTW : they sometimes will give you the Unidisk 3.5"
> motherboard as this upgrade for nothing extra.


Yes, they will do this for you free!! of charge and the unidisc upgrade is
included. I had this done but the problem is still there even afterward.

Any more ideas??


Phil Clark [VK1PC]         Department of Computer Science,     Phone: 
                           Australian Defence Force Academy,   +61 6 268 8157
Email:                     Northcott Drive, Campbell,          Fax:
pgc@csadfa.cs.adfa.oz.au   Canberra, Australia, 2600.          +61 6 268 8581

veale@Colorado.EDU (Anthony Veale) (03/28/91)

pgc@csadfa.cs.adfa.oz.au (Phil Clark) writes:
>> <7175@munnari.oz.au>, a.guillaume@trl.oz.au (andrew guillaume) writes:
>>> pgc@csadfa.cs.adfa.oz.au (Phil Clark) writes:
>>>> I seem to remember reading somewhere, possibly in this newsgroup, that
>>>> Applesoft basic has problems keeping up with data via the serial ports of
>>>> a //c at greater than about 1200 baud. 
>         (Lots & lots of unnecessary deleted!)

>> On the "Boat Anchor"//c, Apple had some design problems with the serial ports

>                   (more lots deleted)

>>BTW : they sometimes will give you the Unidisk 3.5"
>> motherboard as this upgrade for nothing extra.

>Yes, they will do this for you free!! of charge and the unidisc upgrade is
>included. I had this done but the problem is still there even afterward.

>Any more ideas??

>Phil Clark [VK1PC]         Department of Computer Science,     Phone: 
>pgc@csadfa.cs.adfa.oz.au   Canberra, Australia, 2600.          +61 6 268 8581

I also have the "Boat Anchor" flavor of //c.  I bought it before the Unidisk
was released and have never upgraded.

Yet, here I type away happily at 2400 baud.  Occasionally line noise adds a
few characters to what I type and my 'i' key is apt to double strike.  But I
have had no downloading losses at all.

Well, all right, sometimes I have had everything hang, but I am talking all or
none.  This is not dropping of characters-- this is one of the modems or the
campus network getting stuck due to line noise sending special chars or some-
thing.

I have never had any opportunity to run faster than 2400 baud so it may indeed
have problems, but 12 and 2400 baud work fine for me.

Sorry, that I have no suggestions for a solution, but even negative information
can help isolate the problem.

--
Anthony Veale'      veale@coma.colorado.edu   You're failing to take into
Grad. Student       VEALE@JILA.BITNET         account something fairly basic in
Dept. Physics       JILA::VEALE               the relationship between men and
UColorado Boulder                             robots.         - Marvin

jdeitch@umiami.ir.miami.edu (Jonathan Deitch) (03/28/91)

In article <1991Mar28.013526.17057@sserve.cc.adfa.oz.au>, pgc@csadfa.cs.adfa.oz.au (Phil Clark) writes:
> From article <1991Mar26.191258.8367@umiami.ir.miami.edu>, by jdeitch@umiami.ir.miami.edu (Jonathan Deitch):
>> In article <7175@munnari.oz.au>, a.guillaume@trl.oz.au (andrew guillaume) writes:
>>> 
>>> In article <1991Mar26.043509.24160@sserve.cc.adfa.oz.au>,
>>> pgc@csadfa.cs.adfa.oz.au (Phil Clark) writes:
>>>> I seem to remember reading somewhere, possibly in this newsgroup, that
>>>> Applesoft basic has problems keeping up with data via the serial ports of
>>>> a //c at greater than about 1200 baud. 
> 
>          (Lots & lots of unnecessary deleted!)
> 
> 
>> On the "Boat Anchor" //c, Apple had some design problems with the serial ports
> 
>                    (more lots deleted)
> 
>>BTW : they sometimes will give you the Unidisk 3.5"
>> motherboard as this upgrade for nothing extra.
> 
> 
> Yes, they will do this for you free!! of charge and the unidisc upgrade is
> included. I had this done but the problem is still there even afterward.
> 
> Any more ideas??
> 
> 
> Phil Clark [VK1PC]         Department of Computer Science,     Phone: 
>                            Australian Defence Force Academy,   +61 6 268 8157
> Email:                     Northcott Drive, Campbell,          Fax:
> pgc@csadfa.cs.adfa.oz.au   Canberra, Australia, 2600.          +61 6 268 8581

I have no idea what could cause this problem to continue, unless it's your
modem or cable or both at fault - or telephone line noise.  I've got more
unathorized stuff in my //c like MIDI ports and the like and have desoldered
and moved serial chips and the like and haven't had a bit of trouble.  I'm
using the //c right now via modem to call in to Miami's VAX.  I'm stumped as to
a computer based cause of your problem.

Try using a different modem or taking your //c to the computer center and using
a direct connect line with a shielded cable.

Other than that, I with you luck !

- Jonathan
 
------------------------------------------------------------------------------
Internet : jdeitch@umiami.miami.edu               | "Good musicians execute
------------------------------------------------- |  their music but bad ones
"I'm a Time Lord.  I walk in eternity !" - Dr Who |  murder it !!! "

vw3@cunixf.cc.columbia.edu (Vernon Williams) (03/28/91)

In article <8214@crash.cts.com> edwatkeys@pro-sol.cts.com (Ed Watkeys) writes:
>In-Reply-To: message from pgc@csadfa.cs.adfa.oz.au
>
>I'm not sure about this stuff, so if anyone corrects me, trust them...
>
>There are a few issues that we're dealing with at the same time.  First of
>all, when APple first put out the IIc, there was a timing problem with the
>serial ports (they used the system clock and divided it down, to the
>correct frequency, but it wasn't totallt 'correct',, if I recall).  What it

System clock??? The Apple IIc doesn't have a System Clock (unless you buy 
one from AE) I think the proplem was in a crystal. 

			[much stuff deleted]

>typers.  The only solution (the simplest) is to write the ML routines.  You
>could get into interrupts and all that, but between you and I, Apple never
>really told us how to use serial interrupts with ProDOS (they did in the
>IIc Tech Ref, but there are a few fatal typos, and it didn't deal with
>ProDOS...)  One other possibility is to talk to MDAVIS at the site where I

You might also try the ProDOS Technical Reference Manual and/or Beneath
Apple ProDOS. I think Apple tells how to deal with interrupts, it's just that
it's in the ProDOS manual.

>am, and ask him about ModemWorks.  Tell him what you need, and what you
>don't, and the fact that you have a IIc, and he'll tell you if ModemWorks
>will do the job for you...

From what I've seen of ModemWorks...it probably will fit most users' needs.
>
>Edwin Howell Watkeys III
			[Sig deleted]


+---------------------------+-------------------------------------------------+
|Vernon L. Williams         | Electronic Mail:    vw3@cunixf.cc.columbia.edu  |
|Thomas J. Watson Library   | Campus Mail:        130 Uris Hall               |
|Columbia University        | Phone Mail:         212-854-6798                |

greggb@pro-fred.cts.com (System Administrator) (03/29/91)

The upgrade from "Boat Anchor" //c to Uni-Disc compatible //c solves most
of the serial port problems.  19200 seems to garble a bit when scrolling text,
but for y or z modem transfers, it is a champ...

-----------------------------------------------------------------------------
 ProLine  : greggb@pro-fred             InterNET  : greggb@pro-fred.cts.com
    UUCP  : crash!pnet01!pro-fred!greggb
-----------------------------------------------------------------------------
 Listening for wisdom, weeping bitter tears.  Eyes like        |   REZ
 diamonds hearts like steel.  Murdering truth for passionless  |   'n 
 gain.  The gifted youth, kneeling at the altar of pain.       |   ROLL!