PBP projects for R/C models


Results 1 to 40 of 772

Threaded View

  1. #11
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    I want addresses 00 and 01 to look like 4729, or preferably rounded down to 0047 or up to 0048.
    This will write asci to your eeprom data. Your PicKit2 can be set to read data as asci with the little drop down box. By the way, I hope you are not writing to the eeprom each time a distance is measured, because you will wear your chip out pretty quick that way.

    Code:
    distance var word
    inches var byte
    distance = 700
    distance = distance * 10
    distance = distance + 74        'add half of divisor (148) , this is not  needed, but will "round up" if you want to be a little more accurate
    inches = distance / 148
    
    
    write 0,61                      'For "=" (standard asci character set)
                                    'the + 48 changes it from dec to asci
    write 1, inches dig 2 + 48      'will be a "0" if inches = 47
    write 2, inches dig 1 + 48      'will be a "4" if inches = 47 
    write 3, inches dig 0 + 48      'will be a "7" if inches = 47
    Then you can view it like this:
    Name:  inches.PNG
Views: 1389
Size:  41.7 KB
    Last edited by ScaleRobotics; - 28th November 2010 at 15:58.
    http://www.scalerobotics.com

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 11:26
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 16:24

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