• dimming
    hi:friend i have a led project ,need linear dimming, use ARM K60N512VMD100 ADC to control PWM dimming. the ADC is 0.5V-5V, pwm ratio 2% to 100%. step need greater than 200. if me use read table ,...
  • Switch / Case Optimization
    I've read through this thread: http://www.keil.com/forum/8020/ and I understand that: 1. For "a few" case values, I'll get a series of if / else if's. Not sure how many that is. 2. If the case...
  • Switch and Case structure
    I am trying to do a simple function to return values based on the input...shown below. char func (unsigned char add) { signed char i; switch (add) { case 0: i = 0; break; case 1: i = 1; break;...
  • Switch/Case in I2C interrupt
    Hi, I am using C8051F005 as I2C slave. In the I2C interrupt, there is switch/case statement to load SMB0DAT with data to be output based on the OP_CODE. There are 15 cases. The master will get wrong...
  • switch with a case multiple
    Hello: can I put on the case line more than one item to compare Like this switch(aaa) { case: x or y or Z } I try with logical OR but doesnÂ't work. Thanks and excuse me my english ...