Return-Path: X-Spam-DCC: paranoid 1233; Body=2 Fuz1=2 Fuz2=2 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on lipkowski.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DNS_FROM_AHBL_RHSBL, HTML_MESSAGE autolearn=no version=3.1.3 Received: from post.thorcom.com (post.thorcom.com [195.171.43.25]) by paranoid.lipkowski.org (8.13.7/8.13.7) with ESMTP id u1JFLfdb022654 for ; Fri, 19 Feb 2016 16:21:42 +0100 Received: from majordom by post.thorcom.com with local (Exim 4.14) id 1aWmlk-0005oj-Aa for rs_out_1@blacksheep.org; Fri, 19 Feb 2016 15:14:56 +0000 Received: from [195.171.43.32] (helo=relay1.thorcom.net) by post.thorcom.com with esmtp (Exim 4.14) id 1aWmlj-0005oa-Qs for rsgb_lf_group@blacksheep.org; Fri, 19 Feb 2016 15:14:55 +0000 Received: from mail-wm0-f53.google.com ([74.125.82.53]) by relay1.thorcom.net with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86) (envelope-from ) id 1aWmkf-0003L5-Lr for rsgb_lf_group@blacksheep.org; Fri, 19 Feb 2016 15:14:54 +0000 Received: by mail-wm0-f53.google.com with SMTP id g62so72908590wme.0 for ; Fri, 19 Feb 2016 07:13:38 -0800 (PST) X-DKIM-Result: Domain=gmail.com Result=Good and Known Domain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=euScBRvb2qo1Tqw1Rx4PM2KfJUQlfnLx+EqjwqkM3jk=; b=T3B5sBVjbh777wgOvTFeZAT5Eh4Ik3IA/WrGdCnxhttLXykXjuSuqtQ81K0v3HIGp7 9Jolt7HO2JdqkNRZVMTs7GTto/Y/cm+PUYnaQs4hMMmfxJ07Rz6dlZBy798cKQeJdHmS ZrJH9GHotR8FkTWFTWPSYb7XVaMlJVfO76+UI+OHV8yjSgj1uPQ+jRTEF6hNVSrrUxzN KNDIXqS7JOYYyOjgo7qZi3EwBvJb7dAqhIFlofoIXpwpT1j996eCyzPa2yHCpwwgywvy shDe3iaON/4FwuHGVY+wHe5p42E/DqWA7hsLokqwFC94TrPcYjYD3cW4Q2jU+iz8KUAt G8aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=euScBRvb2qo1Tqw1Rx4PM2KfJUQlfnLx+EqjwqkM3jk=; b=AQcZgeATCXwJH7c641yWQK1I4OoTWSiXm0cS6fHfZ80mun49owimuulIZVde81vSaT hHPFqKgWlkb2Jxr1L5IUcrOMu7ymHFuzjsVLSzVMRMELucAGOPAEZ4yl2LOIjj7QkVZr saHnDL5VYDmakBsL5V4i9KUwXl7kpEmthIzAyY6oMdf8GFFrH8hzCjn3lhu8u9hRwnQD rvIBMuOyGcZCvEpthKeYwKKuoVgtKb8YgB/BxcOEJ7givCO1Abkx8kF5m4u5khUnBs/m vGrAcw/dehhdVXk09DMna+4MD5wYB8cvWEk2twPjL8mUYPXOTT7rfCxL8fWimp0WmVZU p/tw== X-Gm-Message-State: AG10YOSWfeKwYbox/uYmvZQ0W15fjLLilvFWe6rRQkm9a5QGSxT0wZqe/eP9R8g6UYFpfd+NCmoBMP//xQQmtA== MIME-Version: 1.0 X-Received: by 10.194.92.68 with SMTP id ck4mr13503774wjb.144.1455894773150; Fri, 19 Feb 2016 07:12:53 -0800 (PST) Received: by 10.28.187.213 with HTTP; Fri, 19 Feb 2016 07:12:53 -0800 (PST) In-Reply-To: <56C4DEFF.5060709@freenet.de> References: <56BDED97.5060308@freenet.de> <56BE0364.6070503@gmx.net> <56BE1134.7060205@freenet.de> <56BE1D9E.6060200@freenet.de> <56C4DEFF.5060709@freenet.de> Date: Fri, 19 Feb 2016 15:12:53 +0000 Message-ID: From: Andy Talbot To: rsgb_lf_group@yahoogroups.co.uk Cc: rsgb_lf_group@blacksheep.org X-Scan-Signature: 54c274b8b0f8da777e8f702c98fe24ad Subject: Re: [rsgb_lf_group] Re: LF: PIC-based GPSDO with A/D converter / supported serial baudrates ? Content-Type: multipart/alternative; boundary=047d7bf0d2dec8bdeb052c20eada X-SA-Exim-Scanned: Yes Sender: owner-rsgb_lf_group@blacksheep.org Precedence: bulk Reply-To: rsgb_lf_group@blacksheep.org X-Listname: rsgb_lf_group X-SA-Exim-Rcpt-To: rs_out_1@blacksheep.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Scanned-By: MIMEDefang 2.56 on 10.1.3.10 Status: O X-Status: X-Keywords: X-UID: 6892 --047d7bf0d2dec8bdeb052c20eada Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I modified an existing module containing a 16F688 (a 14 pin PIC with UART and A/D converter very useful chip) and SP485 driver. Wrote some code to send all the letters of the alphabet and the numbers and [formatting- something immediately recognisable on a screen at various fast baud rates. The characters are sent contiguously with absolutely no gaps between serial words With a 16MHz clocked chip, the maximum baud rate is 1MB/s Using an FTDI RS485 module and my existing serial port monitor written in Visual Basic , I then tested at various speeds. Initially I had the UART set for 1 stop bit, and things began to go a bit flakily with errors even at 250000 baud, then very wrong at 500k and 1M locked up my monitor prog. completely! Then I realised that there was no leeway for clock slippage having just one stop bit, and wondered how to set the PIC's USART for two stop bits. Finally realised the 9 bit data option was the way to do it, with the 9 bit =3D '1' The result is perfect! Watching the letters of the alphabet and numbers whip up the screen there are no errors to be seen at rates up to the maximum with this crystal - 1MB/s. 8 bit data with one start and two stop =3D 11 symbols per byte so nearly 91000 bytes per second. So 12 or even possibly 14 bit data could be sent (with some framing) at 45kS/s. 16 bit at 30kS/s or a bit more with careful format frigging I'm also pleased to discover that the serial terminal programme, 'PUTTY' allows 1Mbaud to be set and again gives perfect reception at that speed. So it looks like the FTDI chipset gives us a decent easy to implement interface at speeds sufficient for our purposes. The spec'ed maximum the 16F688 can run at is 20MHz, so even if that were thrashed it couldn't reach the next speed option the FTDI232R can go at, which is 3MBaud. Your faster device with multiplier may manage that though... if it uses the same USART hardware as the 16F688. You will need to clock at 48MHz to get 3Mbaud Andy G4JNT (In all my bit banging RSxxx implementation I have always used two stop bits, so never thought that the USARt would be implementing this by default On 17 February 2016 at 20:58, Wolfgang B=C3=BCscher dl4yhf@freenet.de [rsgb_lf_group] wrote: > > > Ok then - so the FTDI-chip based interfaces are the ones to use. > In the meantime I got the serial port adapter working at 460800 bits per > second (where the communication with the PIC16F1783 looks good) but not a= t > 500000 bits/sec (where the PIC could realize the bitrate without any > error). The rise- and fall time of the RS232 level converters seem to be > different, so when sending a loop of 0x55 bytes the '0101010' pattern > doesn't look like a square wave with 50 % duty cycle at all. > > --047d7bf0d2dec8bdeb052c20eada Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I modified an existing module containing a 16F688 (a = 14 pin=C2=A0PIC with UART and A/D converter=C2=A0 very useful chip) and SP4= 85 driver.
Wrote some code to send all the letters of the alphab= et and the numbers and [formatting- something immediately recognisable on a= screen at various fast baud rates.=C2=A0=C2=A0=C2=A0 The characters are se= nt contiguously=C2=A0with absolutely no gaps between serial words=C2=A0=C2= =A0 With a 16MHz clocked chip, the maximum baud rate is=C2=A0 1MB/s

Using an FTDI RS485 module and my existing=C2=A0 serial p= ort monitor written in Visual Basic , I then=C2=A0tested at various speeds.= =C2=A0=C2=A0 Initially I had the UART set for 1 stop bit, and things began = to go a bit flakily=C2=A0with errors even at 250000 baud, then very wrong a= t=C2=A0 500k and 1M locked up my monitor prog.=C2=A0completely!
<= br>
Then I realised that=C2=A0 there was no leeway for clock slip= page having just one stop bit, =C2=A0and wondered how to set the PIC's = USART for two stop bits.=C2=A0 Finally realised=C2=A0the 9 bit data option= =C2=A0was the way to do it, with the 9 bit =3D '1'=C2=A0

The result is perfect!=C2=A0=C2=A0 Watching the letters of = the alphabet and numbers=C2=A0whip up the screen there are no errors to be = seen at rates up to the maximum with this crystal - 1MB/s.=C2=A0=C2=A0 8 bi= t data with one start and two stop =3D 11 symbols per byte so nearly 91000 = bytes per second.=C2=A0=C2=A0 So 12 or even possibly 14=C2=A0bit data could= be sent (with some framing) at 45kS/s.=C2=A0=C2=A0=C2=A0 16 bit at 30kS/s = or a bit more with careful format frigging

I'm= also pleased to=C2=A0discover that the serial terminal programme, 'PUT= TY'=C2=A0 allows 1Mbaud to be set and again gives perfect reception at = that speed.

So it looks like the FTDI chipset give= s us a decent easy to implement interface at speeds sufficient=C2=A0for our= purposes.

The spec'ed maximum the 16F688 can = run at is 20MHz, so even=C2=A0if that=C2=A0were thrashed it couldn't re= ach the next speed=C2=A0option the FTDI232R can go at, which is 3MBaud.=C2= =A0=C2=A0 Your faster device with multiplier may manage that though...=C2= =A0=C2=A0 if it uses the same USART hardware as the 16F688.=C2=A0 You will = need to clock at 48MHz to get 3Mbaud

Andy=C2=A0 G4= JNT


=C2=A0 (In all my bit banging R= Sxxx implementation I have always used two stop bits, so never thought that= the USARt would be implementing this by default

On 17 February 2016 at 20:58, Wolf= gang B=C3=BCscher dl4yhf@freenet.de [rsgb_lf_group] <rsgb_lf_group@yahoogroups.co.uk> wrote:
=20
=C2=A0
=20 =20

=20 =20 Ok then - so the FTDI-chip based interfaces are the ones to use.
In the meantime I got the serial port adapter working at 460800 bits per second (where the communication with the PIC16F1783 looks good) but not at 500000 bits/sec (where the PIC could realize the bitrate without any error). The rise- and fall time of the RS232 level converters seem to be different, so when sending a loop of 0x55 bytes the '0101010' pattern doesn't look like a square wave= with 50 % duty cycle at all.
=C2=A0=C2=A0=C2=A0


--047d7bf0d2dec8bdeb052c20eada--