Thread: hex to char problem

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    1

    hex to char problem

    hey guys,

    i am trying to communicate serially with a camera through my microcontroller

    i have to send hex command 56:00:26:00

    the uart function only takes in char pointer to send the data

    so in char, command is V:nullchar:&:nullchar

    nullchar terminates the flow and only V is sent

    pl suggest something.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    First suggestion: try to describe your problem in a way that mere mortals, other than yourself, can understand.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    48
    Have you tried sending "56:00:26:00" as a C-style string?

  4. #4
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by rups21489 View Post
    hey guys,

    i am trying to communicate serially with a camera through my microcontroller

    i have to send hex command 56:00:26:00

    the uart function only takes in char pointer to send the data

    so in char, command is V:nullchar:&:nullchar

    nullchar terminates the flow and only V is sent

    pl suggest something.
    If it is a Canon Camera, take a look at CHDK, you'd find many of this kind of Questions answered in their developer Wiki.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 08-09-2011, 12:41 PM
  2. char* Problem
    By BWHazel in forum C Programming
    Replies: 2
    Last Post: 04-24-2010, 02:27 PM
  3. Conversion Char To Char * Problem
    By ltanusaputra in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2008, 02:06 PM
  4. C++ (char *) problem?
    By Teegtahn in forum C++ Programming
    Replies: 4
    Last Post: 02-05-2008, 01:23 PM
  5. Problem with char and char*
    By chris1985 in forum C Programming
    Replies: 1
    Last Post: 05-08-2005, 11:44 AM