• Redirect
    Hi All, i've implemented the redirection of the printf message as suggested in many examples. It works fine, and i see the application messages in my teraterm console. Now i'm trying to write to a...
  • Best way to see "optimizations"
    Hello everyone, So, I have a program I'm working on an 8051W core chip using Keil's C51 software and have a loop that looks like this: /* If Pressure2 is saturated low*/ if ((Pressure2>>3)...
  • Best way to control a servo?
    Hi, This might be a little OT but I've been exploring a few new ways of controling a servo. I'm using a 8051 board of my own design, a Hitec HS300BB servo and the control line of the servo is connected...
  • the best way to shift
    <Code> #define BITS_TO_ROTATE 2 b=(a>>(8-BITS_TO_ROTATE))+(a<<BITS_TO_ROTATE); After lots of research and experimentation we have determined that this is often the best way as it gives the compiler...
  • redirecting sdtout
    I want to use the printf() to print characters on LCD, via serial port, 7-segment. I want to change this in runtime. My idea was to change the member "handle" of stdout during runtime. In the function...