How to convert HEX Value as formatted BIN String ?


Results 1 to 6 of 6

Threaded View

  1. #3
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    44


    Did you find this post helpful? Yes | No

    Default

    Darrel you are amazing ;-)
    Only one small bug is inside
    the first step will not recognize as show below i used AA 3 times = 1010101010101010
    my watching LED is blinking 1st time but no flashing on remote ?
    It seems that the PIC eats up the first bit. And at last the remote should be off but itīs always on. Looks like shifted one bit.
    I tried something but cannot find where the problem is.
    Code:
    lp var byte
    remote var PORTB.5
    TempB   VAR BYTE
    BitLoop VAR Byte
    ledstepper var PORTB.4 ' Control each step
    
    remote = 0
    LEDSTEPPER = 0
    
    
    FOR lp = 0 TO 2
    LOOKUP lp,[$AA,$AA,$AA],TempB
    FOR BitLoop = 0 to 7
    remote = TempB.0[BitLoop]
    Pulsout ledstepper,1000
    pause 500
    NEXT BitLoop
    next lp
    end
    Instead the sequence looks like that:
    ledstepper : 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
    remotepin : 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1
    Last edited by Robson; - 18th August 2007 at 23:09.

Similar Threads

  1. How to convert a HSERIN string to a hex value?
    By ShortBus in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd October 2009, 04:41
  2. Converting Dec word to Hex string
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th August 2007, 05:44
  3. Visual Basic 6 & Access 2000
    By Demon in forum Off Topic
    Replies: 33
    Last Post: - 7th September 2006, 04:39
  4. Convert dec/binary to Hex
    By SagemFree in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th May 2005, 18:00
  5. hex to bin converter
    By darkman in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th April 2005, 14:41

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