Showing posts with label DS1307. Show all posts
Showing posts with label DS1307. Show all posts

Thursday, February 23, 2012

Propeller LCD and RTC work

Sorry for no updates for a while as I have been ill unfortunately.  Starting to feel better now however so I am back playing around with propeller.  I have a DS1307 real-time clock module (RTC) and the I2C LCD module from my Arduino beacon project that I have been wanting to get working.

The RTC was a complete no-brainer, it just works.  I plan to use it to allow atonomous operation of my beacons that need accurate time information such as WSPR.

The LCD however was a bit of a problem as I am not happy with the display drivers that are out there and have not found an acceptable I2C implementation for any display that I care for.

So, I ported the driver I was using for Arduino to spin and have it working now at least at a macro level.  I have not tested the functionality fully yet.  I am quite pleased with the initial performance.


The plan is to make a rather comprehensive driver that will work with either I2C or parallel mode, though I only will be using I2C.  Above you can see it driving my 20 character by 4 line display.  The I2C bit is implemented in the driver via bit-banging.  This allows the driver to be independent of any other I2C library.  The SDA and SCL pins can be specified with the default to share the I2C pins with the EEPROM.

On other fronts I am putting together a low pass filter module that uses six relay selectable low pass filters for the HF Bands 160 - 10 metres.  10 bands are covered with 6 filters.  Attenuation in the stop band should exceed -40dB.  I anticipate using an 8 bit I2C I/O expander, six bits of which will be used select the appropriate filter for the following bands: 160, 80, 60/40, 30/20, 17/15, 12/10 metres.  I anticipate using the remaining bits for transmit/receive switching and antenna auto-tuner control.  More to come on this.

Saturday, April 2, 2011

New RTC and data logging shield for beacon project

I have built one of the fine data logging shields for Arduino from the fine folks at Adafruit to further clean up my beacon project rats nest.  The new setup looks like this attached to my Arduino Uno.
I need to add a socket for the DDS-60 and a couple headers to bring data GPIO lines out.  The real-time clock has been tested and is functional.  This should be my final setup until a PCB is created for this project.

Trying to spruce up the Arduino beacon project

The Arduino WSPR/QRSS beacon project has gotten to the point where it is time to try and get rid of some of the rats nest of the breadboard nature of the project so far.  To that end, I have mounted the controls and display in a panel.

Next, I will be eliminating the breadboard and using a data logger shield for the Arduino.  This shield has an SD card slot (which I do not need) as well as the same real-time-clock (RTC) I chose for my beacon project the DS1307.  There is also some breadboard space available to mount a socket for the DDS-60 and any other associated discrete components I may need.  This should tidy things up sufficiently to allow the software components to be finalized.

After the software bits are complete (as much as any software project ever is) I will be producing a PCB for the entire project.

So far, my project has grown a bit bloated as I have allowed myself to be sidetracked on numerous occasions by additional modes such as Feld Hell.  I have added some test code to experiment in geneating Hellschrieber-like displays on a QRSS waterfall such as we have in Spectran or Argo.  The resultant bloat has put the code size beyond the code size limit of the ATMega168.  Since I am using an Arduino Uno with the 328 chip, this has not been a problem, but it does increase the expense of this project for others to duplicate or leverage the code.  I will have to work on that and will try to get the code size as small as possible in the final versions.  Things like my choice to do frequency calculations for the DDS using 64 bit integers has no doubt drug in the entire 64 bit math library whereas I only need one operation.  Obviously many opportunities exist for further optimization.

Saturday, February 26, 2011

Checking out the DS1307 RTC with Bus Pirate

Today I am checking out the functionality of the DS1307 with Bus Pirate.  I am supplying power and clock from the Bus Pirate board so +5/Gnd, MOSI/CLK are the only required pins.   Here is the setup:


I set Bus Pirate to I2C at 50khz and turned on the power:
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. JTAG
7. RAW2WIRE
8. RAW3WIRE
9. PC KEYBOARD
10. LCD
(1) >4
Mode selected
Set speed:
 1. ~5KHz
 2. ~50KHz
 3. ~100KHz
 4. ~400KHz
(1) >2
READY
I2C>W
POWER SUPPLIES ON
I2C>
Now I should be able to search for the device on the I2C bus and it finds the device at 0xD0, 0xD1 as expected, so at least it is responding.
I2C>(1)
Searching 7bit I2C address space.
   Found devices at:
0xD0(0x68 W) 0xD1(0x68 R)
I2C>
Now, I try to read four bytes from the DS1307:
I2C>[0xd1 rrrr]
I2C START BIT
WRITE: 0xD1 ACK
READ: 0x00 ACK
READ: 0x00 ACK
READ: 0x01 ACK
READ: 0x01 NACK
I2C STOP BIT
I2C>
So, it looks like things are working, yay!

Friday, February 25, 2011

PC-less WSPR project

It is long past time for me to start posting to this blog.  My current project is an Arduino-based WSPR tone generation module.  I am currently using an Arduino Uno along with a DS1307 Real-Time-Clock (RTC) for timing of WSPR transmissions and an MCP4725 DAC.


I am currently breadboarding the circuit as can be seen above and learning a lot about I2C communications programming.  I have basic DDS software written and generating tones using the PWM functionality on the Uno and an external low-pass filter.  I am now moving to a hardware DAC solution.

WSPR encoding and channel symbol generation code has been completed and verified against WSPRCode.exe available from Joe Taylor, the creator of WSPR so I am confident the WSPR generation bits are functional.

Initially, I am using my software DDS code to generate WSPR tones that could be then fed into an SSB transmitter.  Longer term, I plan to use a hardware DDS to generate RF at the transmit frequency for stand-alone beacon use.