Return-Path: X-Spam-DCC: paranoid 1181; Body=2 Fuz1=4 Fuz2=2 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on lipkowski.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DNS_FROM_AHBL_RHSBL, RATWARE_GECKO_BUILD,USER_IN_WHITELIST_TO 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 u1CHOBOJ003788 for ; Fri, 12 Feb 2016 18:24:11 +0100 Received: from majordom by post.thorcom.com with local (Exim 4.14) id 1aUHFy-0007ej-Vq for rs_out_1@blacksheep.org; Fri, 12 Feb 2016 17:11:46 +0000 Received: from [195.171.43.32] (helo=relay1.thorcom.net) by post.thorcom.com with esmtp (Exim 4.14) id 1aUHFy-0007ea-Jl for rsgb_lf_group@blacksheep.org; Fri, 12 Feb 2016 17:11:46 +0000 Received: from mout2.freenet.de ([195.4.92.92]) by relay1.thorcom.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86) (envelope-from ) id 1aUHEu-0007ty-Ft for rsgb_lf_group@blacksheep.org; Fri, 12 Feb 2016 17:11:45 +0000 Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout2.freenet.de with esmtpa (ID dl4yhf@freenet.de) (port 25) (Exim 4.85 #1) id 1aUHEa-0006kn-KO; Fri, 12 Feb 2016 18:10:20 +0100 Received: from localhost ([::1]:60358 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID dl4yhf@freenet.de) (Exim 4.85 #1) id 1aUHEa-0000qY-Fk; Fri, 12 Feb 2016 18:10:20 +0100 Received: from mx7.freenet.de ([195.4.92.17]:60380) by mjail1.freenet.de with esmtpa (ID dl4yhf@freenet.de) (Exim 4.85 #1) id 1aUHBR-0008CX-3J; Fri, 12 Feb 2016 18:07:05 +0100 Received: from x5d8232a1.dyn.telefonica.de ([93.130.50.161]:49605 helo=[192.168.178.20]) by mx7.freenet.de with esmtpsa (ID dl4yhf@freenet.de) (TLSv1.2:DHE-RSA-AES128-SHA:128) (port 587) (Exim 4.85 #1) id 1aUHBQ-0008Sy-OQ; Fri, 12 Feb 2016 18:07:05 +0100 To: rsgb_lf_group@blacksheep.org, SpectrumLabUsers@yahoogroups.com References: <56BDED97.5060308@freenet.de> <56BE0364.6070503@gmx.net> From: =?UTF-8?Q?Wolfgang_B=c3=bcscher?= Message-ID: <56BE1134.7060205@freenet.de> Date: Fri, 12 Feb 2016 18:07:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56BE0364.6070503@gmx.net> X-Originated-At: 93.130.50.161!49605 X-Scan-Signature: 131286aabc28dd54c072e5e89638c651 Subject: Re: LF: PIC-based GPSDO with A/D converter / supported serial baudrates ? Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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: RO X-Status: X-Keywords: X-UID: 6779 Hi Tobias, Thanks for the information. 12 Mbaud would be fine for a 'real' SDR already, and far more than a PIC with 40 MHz oscillator frequency ( -> 10 MHz 'cycle' clock) needs. To keep the project homebrew-friendly the plan is to use an off-the-shelf adapter (like the ones FTDI call 'USB RS232 Cables' even though they are much more than just a cable..). The 'Prolific' seems unable to read his own transmitted signal at the higher bitrates. I tried it with my own software (WinPic, which contains a terminal emulator for debugging), where I can enter *any* numeric baudrate. But windows (or the driver) never complains, so there is no easy way to check it. In the meantime, 460800 bits/second seem to work, which should be sufficient for approx. 22 kSamples with one channel, and 16 (averaged) bits per sample. Not a replacement for a HiFi soundcard (and not "I/Q" at all), but with a similar principle as recently suggested by G4JNT (using only one channel but a special sampling sequenze) may work just as well. I will find out soon what the PIC16F's max ADC sampling rate of 75 kS/sec can do.. and if the XC8 compiler permits a bit of signal pre-processing (or if I really need to switch to a dsPIC. I hope not..) A block diagram of the GPSDO (as it looks like at this very moment) is at http://www.qsl.net/dl4yhf/gpsdo/gpsdo_pic_main.c . Should anyone here consider building the GPSDO: please be patient - the circuit (contained in the sourcecode as 'ascii art') may be subject to change. I may even decide to replace the PIC16F1783 by a dsPIC30F3013, which unfortunately has an incompatible pinout (despite the same SDIP-28 footprint). 73, Wolf DL4YHF . Am 12.02.2016 um 17:08 schrieb Tobias DG3LV: > Hi Wolf ! > > Please have a look at : > http://www.ftdichip.com/Products/ICs/FT4232H.htm > > it says : "RS232/RS422/RS485 UART Transfer Data Rate up to 12Mbaud. > (RS232 Data Rate limited by external level shifter)." > > The datasheet > http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT4232H.pdf claims > : > "Data Transfer rate: The FT4232H supports a data transfer rate up to > 12 Mbit/s when configured as an RS232/RS422/RS485 UART interface. > Please note the FT4232H does not support the baud rates of 7 Mbaud 9 > Mbaud, 10 Mbaud and 11 Mbaud." > > and : > > "The Baud Rate Generators provides a x16 or a x10 clock input > to the UART’s from a 120MHz reference clock and consists of a 14 bit > pre-scaler and 4 register bits which provide fine tuning of the baud > rate (used to divide by a number plus a fraction). This determines the > Baud Rate of the UART which is programmable from 183 baud to 12 > million baud." > > If you can omit the (RS232-) level shifter and just use the 5 Volt > TTL-Level in/output directly, then higher baudrates than 115200 should > be possible at not too long cable-distances. (if possible, use > RS422/RS485 differential signalling) At the QRL we did tests with this > chip at up to 4 MBit some time ago with some success using the VCP > driver. (There may be other chips from FTDI having a similar > performance, we just selected this one.) > > The FT4232H chip is, too, available as a (not-too-expensive, €28.71) > mini-module at their webshop. (The more prominent chips from FTDI may > be a target to fakes at the "usual market platforms") > > The Windows(/Linux)-program on the PC has to be able to configure > these baudrates. Standard Terminal-programs will support up to 115200 > Baud. But self-created programs could go well beyond this (using the > WIN32 -API). > > 73 de dg3lv Tobias > > Am 12.02.2016 um 15:35 schrieb Wolfgang Büscher: >> Greetings all, >> >> The PIC-based GPSDO I am currently building (using a PIC16F1783, but >> maybe in the end it will turn out to be a dsPIC30F3013) is happily >> synchronizing the surplus 10 MHz VCOCXO for over a week now, without a >> single hiccup. >> So far, so good... I'm quite happy with the very low phase noise from >> the control loop (which uses two integrator to bring back the phase >> error to zero, should there ever be a 'hiccup' which has not happened >> yet). >> The next plan is to use the PIC's internal 12-bit ADC as a replacement >> for the soundcard, and possibly the PIC's internal PSMC as a simple >> downconverter ( programmable switch mode controller, can supply 40 MHz / >> N or 20 MHz / (N + M/16) with the fractional frequency adjustment ). >> To keep it simple, without an extra DDS, frequencies which the GPSDO can >> produce 'directly' (using the PSMC) are for example: >> >> 476190.47619048 Hz >> 475498.33887043 Hz >> 474806.20155039 Hz >> 474114.06423034 Hz >> 473421.92691030 Hz >> 472729.78959025 Hz >> 472037.65227021 Hz >> >> (for the curious reader, the above frequenies are taken from the 10 >> MHz OCXO, multiplied by the PIC's internal PLL to 40 MHz, then divided >> down by the PSMC as described in the PIC16F1782/3 datasheet, >> DS40001579E, on page 220. One could even use the PSMC as a crude BPSK >> modulator, but that's off topic for the moment). >> >> Since I don't want to develop an own USB driver for the digitized input, >> the interface shall use the UART (RS232 or RS422, this is up to the >> re-builder). The question is which serial baudrates (bits per second) >> are supported by the common "RS232" / USB adapters. They all support >> 115200 bit/sec but that's a bit low (if most of the digital >> downconversion shall be performed by the PC, due to the stepwidth of the >> PSMC output), so higher serial baudrates for the transmission of analog >> samples (from PIC to PC) are desirable. The question is WHICH higher >> baudrates are available, and is there a simple way on a PC (Linux or >> Windows, shouldn't matter). >> Must these all be multiples of 115200 ? So far I could only test it with >> the already mentioned 'Prolific' adapter, but I can see no way how to >> enumerate the baudrates which the adapter *really* supports. >> Trial-and-error experiments with various bitrates only produced garbage >> data. The rise and fall times at the RS232-TXD output are about 800 ns >> which is surprisingly steep so I guess the level converter itself cannot >> be the problem. Any ideas / recommendations ? >> Buy a 'good' FTDI adapter (instead of the Prolific), and if so, which >> one exactly ? >> If you have one of those, can you switch it to 1 MBit/second, hook it up >> to a scope, send a few characters from a terminal program and check the >> bit timing + rise & fall times ? >> >> 73, Wolf DL4YHF