Problem runing my code


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    ...... But still gettin wiered symboles when i send from pic to the pc . I want to send dec and ascii but i donno how
    Mus.me, all the ascii from 0 to 31 will give you wierd symboles, and 32 will show nothing because is space. This is the reason why you use the notation DEC before the variable to Tx.

    If you want to receive both decimal and ascii you can Tx twice the variable

    Serout2 SO,390,[DEC B0, " ", B0,13,10]

    or you can select in which format to send out the variable depending on its value

    IF B0<33 Then
    Serout2 SO,390,[DEC B0,13,10]
    ELSE
    Serout2 SO,390,[B0,13,10]
    ENDIF


    Al.
    All progress began with an idea

  2. #2
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    mus.me, all the ascii from 0 to 31 will give you wierd symboles, and 32 will show nothing because is space. This is the reason why you use the notation dec before the variable to tx.

    If you want to receive both decimal and ascii you can tx twice the variable

    serout2 so,390,[dec b0, " ", b0,13,10]

    or you can select in which format to send out the variable depending on its value

    if b0<33 then
    serout2 so,390,[dec b0,13,10]
    else
    serout2 so,390,[b0,13,10]
    endif


    al.
    thank you very much aratti for ur help .i tryed it whith baud 16780 it works good i send from pc to pc and from pic to pc its the same i get using serial communicator of microcode studio .i will try with transmeter and receiver bcz i tryed it using ir it does error .got a amall robot to test likw remote control than i carry on have agreat day ARATTI ...
    HELLO

  3. #3
    Join Date
    May 2009
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    HI ARATTI,

    I DID THIS CODE IT WORKS GREAT THNK U FOR HELP
    Code:
    SYNC CON "A"
    
    SO      con     1                       
    SI      con     0                       
    B0      var     WORD
    B0 = 0
    MAIN:
    Serin2 SI,16780,10,MAIN,[WAIT(SYNC), DEC4 B0]
          
    SerOUT2 SO,16780,["OK MUS ..!  ",DEC4 B0]  
    
    GOTO MAIN
    NOW IM TRYING INFRARED BUT STILL NOT WORKIN I KNOW IR RUNS ON 40KHZ, AND IVE GOT TRANSMITTER AND RECEIVER I FOUND THEM IN PROBASIC STATION METEO WAS SENDING FROM OUTSIDE TO THE CLOCK IN MY ROOM I TOOK THEM OFF BUT AINT WORKIN .
    REGARDS
    Last edited by Mus.me; - 1st December 2009 at 20:46.
    HELLO

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. 16F883 Code Verify Problem
    By munromh in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 11:47
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. problem with my code
    By civicgundam in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd February 2008, 01:52
  5. Code problem
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th May 2006, 04:43

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