RF12 module need to convert some C to Basic


Results 1 to 40 of 44

Threaded View

  1. #18
    Join Date
    Dec 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default On the home stretch

    Latest code is...

    Code:
    Start:
    
    lcdout $fe,$80,"RFM12B OSC test"
    lcdout $fe,$94,"1MHz to 10Mhz"
    
    pause 200
    
    dout = $C0F7
    gosub Writecmd
    
    goto Start
    
    
    WriteCMD:
    
    for n = 15 to 0 step -1
      CMD[n] = dout.15
      dout = dout << 1
    next n
    
    lcdout $fe,$c0," "
    SCK = 0
    nSEL = 0
    
    for nn = 15 to 0 step -1
      if cmd[nn] = 1 then
        gosub write1
      else
        gosub write0
      endif
      lcdout $fe,$14,bin cmd[nn]
    next nn
    
    sck = 0
    nSel = 1
    
    return
    
    
    Write0:
    SDI = 0 : SCK = 0 : pauseus 16 : SCK = 1 : return
    
    
    Write1:
    SDI = 1 : SCK = 0 : pauseus 16 : SCK = 1 : return
    This displays the binary that I want to feed to the RF12 on the LCD... However it still has not changed the osc freq of the RF12. Despite being in a loop giving the command over and over...
    Last edited by davewanna; - 10th June 2008 at 13:04.

Similar Threads

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