Hex In Serial out/in BMW I-Bus


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2007
    Location
    Oxford
    Posts
    3

    Unhappy Hex In Serial out/in BMW I-Bus

    Need to send and recieve data from my BMW I-Bus. But i Just can't get my head round how to send it in Hex format. For example the cd changer has to poll the head unit every 30 seconds to tell it it is still their. To do this it sends :-
    &H18,&H04,&HFF, &H02, &H01,&HE0
    | CD |Lnth|B'CST|DATA|DATA|CRC|

    I have tried:
    Serout PortA.1,T9600,[&18,&04,&FF,&02,&01,&E0] PBP says Syntax Error.
    Do i use
    Serout PortA.1,T9600,[18,4,FF,02,01,E0]
    Or
    Serout PortA.1,T9600,[24,4,255,2,1,244] (Converted to DEC)
    Or will these two give same output ?
    Do i need to put "Quotes" around it?
    can someone please help :

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Take a look at using SEROUT2 and the HEX modifier.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2007
    Location
    Oxford
    Posts
    3


    Did you find this post helpful? Yes | No

    Wink

    Thanks i'll give it a go

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    &$18,&$04,&$FF, &$02, &$01,&$E0
    $ for hex
    % for binary
    # for decimal
    and for ASCII just let it go naked, oh there's a bit of irony.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  2. Need help sending a hex serial output
    By cruzn27 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th December 2009, 13:24
  3. Dynamic USB Serial Number (PIC18F4550)
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th July 2009, 17:03
  4. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 18:51
  5. interfacing to the pc serial port
    By kelangfei in forum General
    Replies: 4
    Last Post: - 7th October 2007, 22:35

Members who have read this thread : 1

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