garbage var from pulsin,,


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    you can't refer to ascii to do your stuff.

    if (PLS <153) AND (PLS> 143) then
    rled =0
    lled = 0
    endif
    if pls > then 153 then lled = 1
    if PLS < 143 then rled = 1

    this already work as you wish.

    you can also refer to binary
    if (PLS <%10011001) AND (PLS> %10001111) then
    rled =0
    lled = 0
    endif
    if pls > then %10011001 then lled = 1
    if PLS < %10001111 then rled = 1

    Or in hexadecimal
    if (PLS <$99) AND (PLS> $8F) then
    rled =0
    lled = 0
    endif
    if pls > then $99 then lled = 1
    if PLS < $8F then rled = 1


    If you want to receive value from PC and convert it to decimal
    SERIN2 PORTB.0,16780,[dec3 loop]

    this will receive 3 character and convert it to decimal value from your terminal.

    If you want to send 123 to pic type 123, if you want to send 10 type 010 and that's it
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    PICMAN's Avatar
    PICMAN Guest


    Did you find this post helpful? Yes | No

    Default

    awsome so i was thinking to hard, if i read 149 at "zero" (in ascii text off bs2)
    then i can refer to this value in pbp, as 149 and it will work,

    this means my design works perectly,

    ty

  3. #3
    PICMAN's Avatar
    PICMAN Guest


    Did you find this post helpful? Yes | No

    Default why it weas garbage and how to fix it,

    ok, the numbers we were thinking are too low look around the 700 regon,, connect the servo batery negitive to the bs2 or pic - power suply,, since the pulse is sent on hi,,, the negitives must be conected for the ic wether (pic or bs2) and the servo pack, other wise you get the junk output, once this conection is made every thing works ,, with dramatically simple coding

Similar Threads

  1. RF Modules
    By tonyfelloni in forum mel PIC BASIC Pro
    Replies: 44
    Last Post: - 26th June 2010, 18:42
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 14:35
  3. Puzzling issue with I2CWRITE to 24LC512
    By aberco in forum General
    Replies: 4
    Last Post: - 22nd August 2008, 18:47
  4. 16F877 RAM Question
    By Art in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 6th August 2005, 12:47
  5. 18F6680 and portd problems.
    By jkbh in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 6th June 2005, 11: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