Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Recent content by dslocum

  1. D

    Simple C problem? Am I blind?

    PROBLEM SOLVED ! I want to thank everyone who helped me. You guys are great !!!:grin: As with many things, it was a dumb oversight on my part. I'm not going to think about how I was able to get what seemed to be bad data. I hope I don't loose too much sleep over it. The problem was that...
  2. D

    Simple C problem? Am I blind?

    I had tried some casting early on, but tried your suggestions just now. Both fail. I also tried using 0b01111111 instead of 127. I also tried setting a unsigned short = 127 and subtracting from the variable. - - - Updated - - - Moved it out of the function. This works fine BOTH ways...
  3. D

    Simple C problem? Am I blind?

    I'm not sure how an Arduino function would help in a PIC environment????
  4. D

    Simple C problem? Am I blind?

    Good suggestion. I this works fine as expected when I don't try my inverting trick (127 - valueVOL), turning on the LED 1/2 way thru the ramp cycles. LATB0_bit is the LED. // WORKS temp = valueVOL; if(temp > 64) { LATB0_bit = 1; } else { LATB0_bit = 0; } This does...
  5. D

    Simple C problem? Am I blind?

    Re: Simple C problem? Am I blind? Thanks for the suggestions. I'll make some tests tomorrow and get back. Good thought, but I'm not sure we can assume the compiled code is correct because the SW debug emulator says it is when we single step thru it. I will have to imagine them as two...
  6. D

    Simple C problem? Am I blind?

    I thought long and hard about possible weird casting issues and have tried several things, to no avail. I wish I knew how to hardware debug this. It's a custom design (mine), but I only have a PICKIT3 with ICSD for programming. I've tried to set the project to output debugger info, but can't...
  7. D

    Simple C problem? Am I blind?

    Good point. The "Vol_Write_Byte" routine serializes the byte via 'bit-banged' SPI, which works fine if I don't try what I'm trying to do. If I run it in the software debugger, everything looks fine with results as expected in both test cases. Since I can't (or don't know how to) hardware...
  8. D

    Simple C problem? Am I blind?

    I'm using MikroC Pro for PIC24. Reasonably comfortable in C, but this has been difficult problem for many hours. My hardware uses an electronic attenuator chip that works just fine. I can program it to 'attenuate' for 0 (full volume) to 127 (minimum volume / mute). That works great. Simple...

Part and Inventory Search

Back
Top