[time-nuts] GPS seconds conversion on an Arduino

Chris Albertson albertson.chris at gmail.com
Mon May 15 06:22:57 UTC 2017


Are you still going for Sidereal time?  If so that is floating point

The ARM processor unlike the Arduino does not have fixed pin assignment.
Typically there are many UARTS, I2C interfaces, ADC units and so on more
than there are physical pins.  Within some limits you assign functions to
pins in software.    Some you don't need to make a special board at OSHPark
with three serial ports.   You can move the serial function to the pins you
like.

That said, moving functions to pins is an "advanced" software art.  So to
make it easy for normal people the development environment will have some
easy way to do this and some limits too.

You can program most ARM M boards using Arduino but that IDE while day to
use is limited.   The next step up is "mbed" which is much more capable and
lets you move some functions to some pins the IDE is web based so there is
no software to install.   (OK you can work locally if you like.  There are
several ways to do that.

This is my favorite under $2 boards now
http://www.ebay.com/itm/STM32F103C8T6
<http://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino-/192181979870?hash=item2cbef04ade:g:pBgAAOSwvihY8r-0>
The specs are literally an order of magnitude over Arduino and at under $2
shipped thrice is right.   These are Arm Cortex M3 in the size of a large
1970's vintage DIP chip.  Google the P/N for loads of information    This
parts works on bed and arduino IDEs   as well as simply using the gcc arm
compiler.

The other one I use is Nucleo F401RE
These are $13 each and unlike the above have loads of 1st rate
documentations written by a US company ST Micro.
https://developer.mbed.org/platforms/ST-Nucleo-F401RE/
Yes you can snap off the programmer and reconnect it with jumpers or leave
it on.   Even if you leave it on you can use it to program the STM32F103.
Saves you from having to buy an Chinese clone ST-Link dongle.

TheF401RE is the "classic" part that most example programs have beed tested
on but I'd buy the F446RE for $1 more.  It's twice as fast and has more RAM.

The mbed IDE lets  you use most C source code you can find and it runs a
real time OS.    Arduino is still hands down the easiest environment to
learn and it runs at 5 volts.  I keep one for testing 5V hardware.  All the
arm stuff is 3v3

Most any ARM board can run with the Arduino IDE it some one wrote a boot
loader for it.  The mbed boards don't use bootloders.  They "look" like a
flash drive to your PC so all you do is drag and drop the BIN file to the
flash drive and the board then runs whatever case to dropped there.


One more bit of advice.  Buy a logic analyzer.   I was using one today and
mad it save a LOT of time debugging when you can see what data is on the
pins.  Logic analyzers used to be expensive but one god enough for this
kind of work is now under $10 for a Saleae clone
http://www.ebay.com/itm/24MHz-8CH-USB-Logic-Analyzer-24MHz-8-Channel-Compatible-to-Saleae
<http://www.ebay.com/itm/24MHz-8CH-USB-Logic-Analyzer-24MHz-8-Channel-Compatible-to-Saleae-ARM-FPGA-M100-/272337085235?hash=item3f688e2333:g:RNcAAOSwPCVYBD2b>
They work like a scope for digital and can do protocol decoding show the
data going over a cable.


On Sun, May 14, 2017 at 2:16 PM, Ben Hall <kd5byb at gmail.com> wrote:

> Hi Chris and list,
>
> My original goal was to duplicate, more or less, what the PackRat guys did
> to get the TruePosition boards up and functional as described here:
>
> <http://www.packratvhf.com/A%20Packrat%20GPS%20Receiver%20Project.pdf>
>
> I did get in touch with them and they forwarded the HEX files.  I haven't
> tried them yet, but another list member did try them without success.
>
> I figured, as a learning exercise, I'd program up my own interface.  The
> boards do not talk NMEA...but output their own format of message.  One
> message contains GPS time in seconds...plus the number of leap seconds that
> have elapsed, so my goal there was to convert the GPS time from the unit
> into normal UTC date and time.
>
> On 5/14/2017 12:38 PM, Chris Albertson wrote:
>
>> Unless this is an educational exercise I'd move to a different processor.
>> One of those $3 Arm M3 units has enough  memory AND a more standard
>> development environment that you could use a standard library function to
>> do what you need.
>>
>
> It is an educational exercise...but I'm still going to look into this.
> Another list member suggested a different Arduino board that had two real
> serial ports, as right now the Uno board I'm using only has one hardware
> serial port with a second duplicated in software.  (one port talks to the
> TruePosition board...the other is debugging output port)
>
> I did happen to recall that I included a Teensy-LC board (Cortex M0) in a
> recent OSHPark PCB order...and it appears to have three hardware serial
> ports...so this may be the way I go eventually.
>
> One of the reasons I liked the Uno was due to all the tutorials and
> example code floating around...plus the nice selection of libraries...as
> I'm not a programmer.  My code would probably make a real programmer lose
> his or her lunch.  :(
>
> thanks much,
> ben
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/m
> ailman/listinfo/time-nuts
> and follow the instructions there.
>



-- 

Chris Albertson
Redondo Beach, California



More information about the Time-nuts_lists.febo.com mailing list