Serin serout problem


Results 1 to 40 of 337

Threaded View

  1. #29
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    its working good, now, I think I have a problem with the 2,s compliment, working on it
    I am just doing 2,s compliment, I get all 1,s at the output


    Zerotemp:
    temperature = temperature >> 1 'removing lowest bit
    temperature1 = temperature
    for counter=0 to 6 ' 2's compliment, starting to invert all the digits
    if temperature.0[counter] = 1 then temperature.0[counter] =0
    if temperature.0[counter] = 0 then temperature.0[counter] =1
    next counter
    'temperature = temperature + 1 ' 2,s compliment ends by adding a one

    'temperature = ((( temperature >> 1) *100)- 25) + (((count_per_c - count_remain) * 100) / count_per_c)
    'tempc = (((temperature *9) / 5) + 3200)

    lcdout $FE,1, "TempC: ", bin temperature1, ".", dec2 temperature," ",$DF,"C"
    lcdout $FE,$C0, "TempF: ", bin temperature , ".", dec2 (tempF // 100)," ",$DF,"F"
    goto loop
    Last edited by lerameur; - 28th December 2006 at 22:36.

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