Return to KLUBNL.PL main page

rsgb_lf_group
[Top] [All Lists]

Re: [rsgb_lf_group] Re: LF: PIC-based GPSDO with A/D converter / support

To: [email protected]
Subject: Re: [rsgb_lf_group] Re: LF: PIC-based GPSDO with A/D converter / supported serial baudrates ?
From: Andy Talbot <[email protected]>
Date: Fri, 19 Feb 2016 15:12:53 +0000
Cc: [email protected]
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==
In-reply-to: <[email protected]>
References: <[email protected]> <[email protected]> <[email protected]> <CAA8k23S4yT+pAfLGGaMH8XnPGa4WPNS4YZHJNKc4WQpydSsu9g@mail.gmail.com> <[email protected]> <CAA8k23SSF0vfOaRgwU_56yFmksVYLsZ-yfGpFvP9=-LEDCxHCA@mail.gmail.com> <[email protected]>
Reply-to: [email protected]
Sender: [email protected]
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 = '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 = 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üscher [email protected] [rsgb_lf_group] <[email protected]> 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 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.
   


<Prev in Thread] Current Thread [Next in Thread>