Multitasking 12F675 I/O


Closed Thread
Results 1 to 2 of 2
  1. #1
    jpeakall's Avatar
    jpeakall Guest

    Default Multitasking 12F675 I/O

    Hi All,

    I have been working on a two way wireless temp and humidity sensor. I have it working, and now I am finishing the circuit up prior to making a PCB.

    Anyway, I am one pin short of having all the features I want using the 12F675. Can anyone think of way I can fit it all in? Here is the layout.

    The remote sensor has an SHT11 and a TX/RXLC 315mHz transmitter/receiver. The 12F is run on 4 "AA" batteries in series through a 2.5Vreg. The TX/RX runs directly off the battery. The battery pack has a tap at the midpoint, i.e.. 2.6V when the pack is fully charged. I monitor the batteries at the
    midpoint tap, and multiply it X2 to get the actual battery voltage. It's not perfect, but close enough for government work. The TX unit is run directly from one of the 12F pins so that it can be turned off during reception. This greatly improves range. The rub is I want to add a piezo speaker for remote reception check during placement of the sensor. I could live without it, or
    I could use a different PIC, but I'd really like to squeeze it all into the 12F675.

    The pin layout is as follows:

    GPIO.0 -- ADC for battery monitoring
    GPIO.1-- Switches TX off and on
    GPIO.2 -- TX data line
    GPIO.3 -- RX data line (.3 is input only)
    GPIO.4 -- SHT11
    GPIO.5 -- SHT11

    So basically I am looking for a way to run a piezo speaker. Any ideas how I
    could squeeze it all in?

    Thanks,

    Jonathan

    www.madlabs.info

  2. #2
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    Maybe you can multiplex GPIO.1 and GPIO.2 for the speaker.

    I explain myself, from the info provided the speaker is meant for reception (i.e. RX). You can drive the speaker from the GPIO.2 (TX.data) 'anded' with the GPIO.1 (with the proper polarities of course). Thus, when the transmitter is off the speaker is on (enabled). Any data on the TX line (GPIO.2) will not be transmitted (since the TX is off) but will be available for the speaker. When the TX is on the speaker is off (disabled), and any data on the TX line is transmitted but does not get to the speaker.

    Something like that. Hope it helps anyway.

    languer.

Similar Threads

  1. 12F675 and LM35 coding issue
    By Bobbo_ZA in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 10th March 2010, 15:52
  2. 12F683 vs 12F675.
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th July 2009, 04:58
  3. I/O extender
    By mychangl in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 20th November 2008, 14:56
  4. 16F877 universal PCB with I/O module
    By cupajoe in forum Schematics
    Replies: 12
    Last Post: - 3rd September 2005, 13:39
  5. Pic 12F675
    By sherm in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 12th March 2003, 12:04

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts