How to convert HEX Value as formatted BIN String ?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Ah Ha! MSB first.

    I should have seen that.

    Great, glad you figured it out.

    regards,
    DT

  2. #2
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    44


    Did you find this post helpful? Yes | No

    Default

    @Darrel
    thatīs really fantastic. Iīve shrunked my data code about the strings from 2,7kB to :
    just listen 195 "BYTE" using the Eeprom now. Not the complete program but only the data space, which tooks a lot of memory. It was not possible before to store that whole data on the eeprom. But with this great snip of code, knowing now to realize for coming projects, can i save a hugh amount of space of my lovely PIC ;-)
    I just canīt believe it now.
    One complete string takes 31 byteīs of the eeprom space. I have 8 instructions to send by pressing a key.
    Only for demonstration :
    Code:
    volume-:
    a = 0
    gosub loop
    
    volume+:
    a = $20
    gosub loop
    
    undershort:
    a = $40
    gosub loop
    
    underlong:
    a = $60
    gosub loop
    
    sourceleft:
    a = $80
    gosub loop
    
    sourceright:
    a = $A0
    gosub loop
    
    scrollup:
    a = $C0
    gosub loop
    
    scrolldown:
    a = $E0
    gosub loop
    
    end
    
    loop:
    b = a + $1D
    FOR lp = a TO b
    read lp, tempb    
           FOR BitLoopH = 7 to 0 step -1
               remote = tempb.0[BitloopH]
               pauseus 660
           NEXT BitLoopH
    next lp
    PORTB.4 = 1 ' Control LED if sequence finished
    pause 1000
    PORTB.4 = 0
    return
    Maybe i forgot something ...
    But itīs still working... So i donīt forget something :-)
    Big thanks to YOU

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, 05:41
  2. Converting Dec word to Hex string
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th August 2007, 06:44
  3. Visual Basic 6 & Access 2000
    By Demon in forum Off Topic
    Replies: 33
    Last Post: - 7th September 2006, 05:39
  4. Convert dec/binary to Hex
    By SagemFree in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th May 2005, 19:00
  5. hex to bin converter
    By darkman in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th April 2005, 15: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