Shop OBEX P1 Docs P2 Docs Learn Events
My Proto Board — Parallax Forums

My Proto Board

NewzedNewzed Posts: 2,503
edited 2007-08-06 22:04 in Propeller 1
Love my Proto Board.· Since I got the DS1302 installed and working - see

http://forums.parallax.com/showthread.php?p=663095

I thought I would add a temperature readout to the LVD display.· Hooked up a TLC2543 ADC AppMod I had built to a BS2E,·added an LM34DZ to the ADC, and serouted the temperature data to Pin 7 of the Proto Board using baud 84.· Processed the incoming data on the Proto Board, and sent it to my 4x20 LCD using baud 16468.· On the first cycle the LCD displays date, time, day of the week and hurricane notes.· On the next cycle,the day of the week is replaced by the inside temperature.· These cycles repeat with about a 2-second delay between each cycle.· Works great.

Now...what else can I add to my little Proto Board.· It has a 512K EEPROM, so maybe I can use the upper·32Kb to store date, time and temperature.· If I use 33_000 as the starting address, that gives me 31_000 bytes of storage space.· It takes 9 bytes to store all the clock and temp data.· If I change the interval to 1 minutes, and since the system only runs about 12 hours a day, I could store almost 5 days of data.· Sounds like a good project.

Sid

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.

That is why they call it the present.

Don't have VGA?
Newzed@aol.com
·

Comments

  • NewzedNewzed Posts: 2,503
    edited 2007-08-05 18:32
    Forgot to mention - I'm using a 4.7K in series with the serout line to the Proto Board.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • hinvhinv Posts: 1,253
    edited 2007-08-05 19:09
    Now this is what I was going to do with my proto boards, but I thaught I was going to have to use sdcards to store the temp and humidity data, but I forgot about the extra space in the eeprom. For me, every half hour is good enough, so I can run for 75 days. The question then becomes power consumption as I want to place them about in my warehouse and not have to worry about having a power outlet, batteries become necessary.
    Are you going to use your 32.768khz crystal for the props clock also?

    Thanks,
    Doug
  • NewzedNewzed Posts: 2,503
    edited 2007-08-05 19:26
    No, Doug.· The 32.768 is exclusively for the 1302.· Those crystals are SO sensitive to outside goings-on I wouldn't dare use it for anything else.· The Proto Board is running off the 5mhz crystal that came with it.· My Prop piggyback has a 512k EEPROM and I am using the upper 32Kb to store data I enter from the keyboard - reminders, appointments, etc. - and it works very well.· I store the current EEPROM address at the very top of the EEPROM, and when I select the "Write to EEPROM" option, the screen tells me what the current address is and what the upper limit for data storage is, so I always know how much room I have left.

    A suggestion - why not use a 6V lantern battery for your warehouse units.· The lantern battery has a capacity of 50,000mah, so that should last you for a good while.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-05 19:37
    According to the datasheet, the Prop will consume less than 10 myA when sleeping at RCSLOW clock (= 20 kHz). When waking up, you can easily change to a higher speed. However the RCSLOW clock is not very precise (+/- 20%)

    Post Edited (deSilva) : 8/5/2007 7:47:04 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-05 20:57
    Why not run the Protoboard using the 5MHz clock, but without the PLL? The current drawn is around 300ua for just the oscillator. You could have 7 of the cogs halted and have the 8th cog waiting for the next second to occur. You'd have a Spin routine that would increment a counter and wait for the next second to occur. Every 1800 counts, you'd read the temperature and humidity data and store it in the EEPROM with the time and date. Most of the time the count increment would take only a few microseconds and the current drawn by the chip would drop for the remainder of the second. The average current would be well under 1ma and you'd keep accurate time without the need for the clock chip and crystal.
  • NewzedNewzed Posts: 2,503
    edited 2007-08-05 21:36
    Mike, was·the above post for me or for Doug?· I have no current problems since I am running from a power supply.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • NewzedNewzed Posts: 2,503
    edited 2007-08-06 22:04

    Now my little Proto Board can write/to or read/from the EEPROM. I allocated 33,000 to 63,000 for data storage, with the current address being stored at 63,500.

    Writing the method for reading the EEPROM was a bit tricky. I had to insert a " / " between month and date and between date and year, and I had to insert a " : " between hours and minutes and between minutes and seconds. Also, I had to insert a " . " between the temperature integer and the temperature decimal. However, I finally got it all straightened out. I must thank Mike Green for the "built-in" I2C protocol in his OS system. Couldn’t have managed without that.

    If I wanted, I could send the EEPROM data to Hyperterminal and capture it to an Excel file – maybe I’ll do that later.

    I added a "safety" line in the method that writes to the EEPROM. If the next address to write to is greater than 63,000, the program automatically stops the writing process and returns to the start Menu. I wasn’t sure, but it occurred to me that if the EEPROM tried to write beyond 64,000, it might "wraparound" and overwrite the program stored in the lower half of the EEPROM. That’s the way most EEPROM’s work, so I just played it safe.

    It takes 8 bytes to store my data. With 30000 bytes available I can store 3,750 packets. If I store a packet every minute, that is 3750/60 = 62.5 hours = 2.6 days of data I can store.

    If the Proto Board is in a remote location and using the LCD display it still writes the data to EEPROM. When I want to read the EEPROM data, I just bring it to my desk, plug in power, keyboard and VGA and press R.

    I added a red LED to Pin 8, which turns on if I am writing to, reading from or clearing the EEPROM.

    Now……………what can I add next?

    Sid







    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
Sign In or Register to comment.