Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6228411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:23:02+00:00 2026-05-24T09:23:02+00:00

I am writing C code for an embedded target, Microchip PIC24, and the runtime

  • 0

I am writing C code for an embedded target, Microchip PIC24, and the runtime libc for some reason won’t properly send \0 values over the serial port.

printf("\xEE\xEE\0test");

for example sends EE EE “test”, the null byte is ignored.

Has anyone a clue why this might be?

EDIT: Ermmm, never mind XD. I was using puts to send over the string.. doh’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:23:03+00:00Added an answer on May 24, 2026 at 9:23 am

    A null character is the string terminator in C. printf stops there because the \0 is the end of the string as far as it is concerned. Use putchar(), or printf() with a format string may work:

    printf("%c", '\0');
    

    If you are getting 0xEE 0xEE test on the line as you suggest, are you sure the test isn’t coming from a different printf call?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some example code where an embedded Jetty server is started. The server
I am writing some embedded code in C and need to use the rand()
I'm writing some C code for an embedded application, and I've run into a
I'm writing system-level code for an embedded system without memory protection (on an ARM
I am writing code in embedded linux since last couple of years, I use
I'm writing mostly embedded code at work. We have a big long-term project that's
I'm writing the startup code for an embedded system -- the code that loads
I am writing code for a real-time program running in an embedded Linux system.
All, I have been writing some code to attempt to extract a collection of
I'm writing an application with some embedded video content, it's Android 2.2 that I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.