Serial problem between BasicStamp code and PBP code


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serial problem between BasicStamp code and PBP code

    OK lets get this straight. Is it like this :-


    Android --over air ---ASCII ---- BTooth BTooth ----- Z ------PIC16F84 PIC16F84 ----2bytes------FT639

    What is Z protocol? You have that as expecting ASCII in the code.
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  2. #2
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serial problem between BasicStamp code and PBP code

    Ah following it a bit better now.

    I'm near your age and still learning PBP, usually by trial and error.

    Try this and see if it works, SEROUT2 according to manual is same as BS2 serout

    I'm probably completely wrong
    Attached Files Attached Files
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  3. #3
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serial problem between BasicStamp code and PBP code

    Allan,

    Search the net for MicroCode Studio Editor (MCS) it is free and will help tremendously.

    Any code posted on forum will likely be raw. i.e. no code formatting unless it is written that way
    so usually people copy the code into MCS which displays in formatted code.


    The code tag is the # button on the posting panel.
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Serial problem between BasicStamp code and PBP code

    I am using MicroCode Studio Editor. That's where the example code was written in. I had to change the extensions on the 2 files. otherwise it would not let me upload them. The BasicStamp extension shoul be .bsp and the PIC code ext should be .pbp

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Serial problem between BasicStamp code and PBP code

    I tried your code. Still not working. What I am having a hard time with is the code for the BasicStamp works 100%. The only changes I needed to make according to the PBP manual was the baud rate. The BasicStamp2p is faster than the BasicStamp2 and the baud rates in the PBP manual Appendix A are the same as the BasicStamp2 which is what I need for the PIC16F84 at 4Mhz. The other change was the move1 and move2 routines. PBP does not support nibble so I had to modify the code to send the apporpriate low and high bytes.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: Serial problem between BasicStamp code and PBP code

    The Android APP has U D L R arrows plus a button in the center. When I press one of the arrow keys or the center button, it sends a Capital U D L R or C via Bluetooth to the HC-06 bluetooth module which sends it to the PIC. I then check what was sent and select which way to move the servos using the appropriate servo controller command bytes. The ASCII values are only used to tell which button was pressed. The values 122(z) 117(u) 85(U) 90(Z) and 103(g) are numeric values needed to send to the FT639 to intialize it. Once it it initialized then the protocol explained previously is used to position the servos.

Similar Threads

  1. Zero-error 1 second Timer code for PBP?
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th June 2013, 14:31
  2. pbp code
    By samixta in forum PBP Wish List
    Replies: 2
    Last Post: - 2nd July 2011, 20:53
  3. pbp code for DS3234
    By itsssyam in forum General
    Replies: 2
    Last Post: - 23rd December 2009, 10:31
  4. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  5. Changing Swordfish code to PBP
    By Ron Marcus in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th April 2008, 01:28

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts