Serin serout problem


Closed Thread
Results 1 to 40 of 337

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    yes the TX module is fully completed , I was doing my earlier test with it.
    well also, i wanted to add a led for the battery alarm. A led for when the temperature goes over 50 F, and a piezo buzzer that gos off for 10 sec if the temperature goes over 50 F.
    Last edited by lerameur; - 31st December 2006 at 03:47.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    yes the TX module is fully completed , I was doing my earlier test with it.
    well also, i wanted to add a led for the battery alarm. A led for when the temperature goes over 50 F, and a piezo buzzer that gos off for 10 sec if the temperature goes over 50 F.
    So what's the next step?

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I am using a pic16F88 and I amnot sure whcih pins to use. Right now I am using pins 1, 2, 17, 18 for my lcd out and also pin 6,7 for control. Pin 5 and 14 for powering. Pin 8 for input.
    If I use the Vref, then i need to move my lcd out pins to pin 10 through 13 ( I wanted to us these for led out, piezo and other outputs i needed. I never had luck outputting on port A. Shouln't be hard to get it going.
    Also I dont have any MCP1525, I only have 7805 chips maybe use this chip for now and replace it when I get another ?...
    and use a voltage divider on the 7805 to obtain 2.5 v ?
    I assume the MCP1525 is an LDO chip ??

    also instead of using 40k and 10 K resistors, can I use 400k and 100K ? would that take up even less power ?
    Last edited by lerameur; - 31st December 2006 at 13:22.

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    hi , maybe i woul dneed expert advise here on wiring and soldering. I think I did an ok job, but when i move my wires a few times after soldering, they break, I use the same wire that i use on the breadboard (picture you seen )
    k

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    I am using a pic16F88 and I amnot sure whcih pins to use. Right now I am using pins 1, 2, 17, 18 for my lcd out and also pin 6,7 for control. Pin 5 and 14 for powering. Pin 8 for input.
    If I use the Vref, then i need to move my lcd out pins to pin 10 through 13 ( I wanted to us these for led out, piezo and other outputs i needed. I never had luck outputting on port A. Shouln't be hard to get it going.
    Also I dont have any MCP1525, I only have 7805 chips maybe use this chip for now and replace it when I get another ?...
    and use a voltage divider on the 7805 to obtain 2.5 v ?
    I assume the MCP1525 is an LDO chip ??

    also instead of using 40k and 10 K resistors, can I use 400k and 100K ? would that take up even less power ?
    Well, if you can't change the Vref pins around, then maybe use 2 A/D converters and compare your fixed reference against the total applied? In other words, if you're battery ever got down to 2.5v, then the A/D input would be at maximum. Just takes a bit of math I supose...

    And since you don't have any MCP1525 or anything like it, I know one thing you do have that does have a fixed reference...

    Or do you?
    I'll give you a little bit to think about it, then I'll give you the answer.

    And also since you don't have a fixed voltage (or do you? )...you won't need to worry about the resistors for now.

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    the only fix voltage I have now is my Lm7805 at 5v.

    and also, what is the lowest voltage for 4 Nmhi batteries, (when needed to be changed)

    well I removed the Lm7805, , i dont have any fox voltage reference. also, leaving the LM7805 there, i could not get enough voltage for the unit to operate
    Last edited by lerameur; - 1st January 2007 at 17:00.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    the only fix voltage I have now is my Lm7805 at 5v.

    and also, what is the lowest voltage for 4 Nmhi batteries, (when needed to be changed)

    well I removed the Lm7805, , i dont have any fox voltage reference. also, leaving the LM7805 there, i could not get enough voltage for the unit to operate
    Read the datasheets for the 7805 and you'll find out why you can't get enough voltage from them, they need a couple of volts of overhead to operate correctly.

    Lowest volts for NiMH batts - really depends on the current draw, the higher the draw, the higher the end voltage. I suspect for your application, you might want to charge them up when they hit 1v/cell (4v total). That will give you some time to get to it. I wouldn't let them get much below .8v/cell, but then they're on their way out anyways. As far as charging, take them up to about 1.4v/cell depending on the charge rate, faster charge, higher voltage (up to a point of course), slower charge, lower voltage. Overall, 1.4v is a good round number.

    More on the easy voltage reference later. Here's a bit of a teaser for you: take a diode, any old diode, a resistor and a 9v battery. Hook it up as follows, +9v to resistor, resistor to one side of diode, other side (banded side) of diode to -9v. Read the voltage across the diode, just the diode and only the diode. Now change the value of the resistor, read the voltage across the diode again, change the resistor again, read the diode again, swap the 9v battery for the 4cell NiMH pack, read the diode again. Let me know your results.

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    yes actually, i went and read that , its like a diode, loosing 0.7 volt, so you need a bit more to compensate..
    i have been working on the a/d conversion, again this is my first time, I am reading section 12 of he pic16f88 datasheet.

    i wrote this program , bit it do not display the right inotmation:


    'RECEIVE PIC
    INCLUDE "modedefs.bas"
    DEFINE OSC 20 'use external 20mhz crystal
    CMCON = 7
    ANSEL = %00001100 'Put port 2 and 3 analog and otehr digital
    ADCON1 = %11000001 ' Set PORTA analog and RIGHT justify result
    ADCON0 = %00010001 ' Configure and turn on A/D Module

    DEFINE LCD_DREG PORTB ' Set LCD Data port
    DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_RSREG PORTB ' Set LCD Register Select port
    DEFINE LCD_RSBIT 1 ' Set LCD Register Select bit
    DEFINE LCD_EREG PORTB ' Set LCD Enable port
    DEFINE LCD_EBIT 0 ' Set LCD Enable bit
    DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_LINES 2 ' Set number of lines on LCD
    DEFINE LCD_COMMANDUS 2500
    DEFINE LCD_DATAUS 250
    DEFINE CHAR_PACING 2000
    pause 1000

    ' Define ADCIN parameters
    Define ADC_BITS 10 ' Set number of bits in result
    Define ADC_CLOCK 3 ' Set clock source (3=rc)
    Define ADC_SAMPLEUS 50 ' Set sampling time in uS

    input1 var word : input2 var word

    TRISA = %11111111 ' Set PORTA to all input

    Pause 500

    loop: ADCIN portA.2, input1
    ADCIN portA.3, input2

    Lcdout $fe, 1 ' Clear LCD
    Lcdout "Value1: ", DEC input1 ' Display the decimal value
    lcdout $FE,$C0, "Value2: ", dec input2
    Pause 200

    Goto loop
    End

  9. #9
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    More on the easy voltage reference later. Here's a bit of a teaser for you: take a diode, any old diode, a resistor and a 9v battery. Hook it up as follows, +9v to resistor, resistor to one side of diode, other side (banded side) of diode to -9v. Read the voltage across the diode, just the diode and only the diode. Now change the value of the resistor, read the voltage across the diode again, change the resistor again, read the diode again, swap the 9v battery for the 4cell NiMH pack, read the diode again. Let me know your results.[/QUOTE]

    I will do this test a little bit later, i will give you the results.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

Members who have read this thread : 0

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