RF12 module need to convert some C to Basic


Results 1 to 40 of 44

Threaded View

  1. #16
    Join Date
    Dec 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default whoops

    I just realised what I did...

    dout = dout << 1
    lcdout $fe,14,bin dout.15

    I was displaying the dout bit after it had shifted... Stupid me.. I swapped those 2 lines, and I know I am giving the right string of bits to the array...
    I'm trying to display the array to see if all those bits went in.. Something is not right tho.

    Code:
    n		        VAR	BYTE
    nn		        VAR	BYTE
    cmd                            VAR            BYTE[15]
    ...
    
    lcdout $fe,$C0," "
    for n = 15 to 0 step -1
      CMD.0[n] = dout.15
      lcdout $fe,14,bin dout.15
      dout = dout << 1
    next n
    
    lcdout $fe,$d4," "
    for nn = 0 to 15
      lcdout $fe,$14,cmd.0[nn]
    next nn
    This last bit where I try to display the cmd array just gives me garbage characters.
    Last edited by davewanna; - 10th June 2008 at 12:03.

Similar Threads

  1. Version Control
    By btaylor in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 16th October 2011, 18:12
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  3. Replies: 1
    Last Post: - 27th July 2008, 07:14
  4. using AND as an IF statement
    By dw_pic in forum mel PIC BASIC
    Replies: 27
    Last Post: - 8th June 2006, 19:05
  5. convert Basic Stamp2 (BS2) => Pic
    By bs2rdu in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th September 2005, 20:55

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