-
thank you, that worked perfectly!
2009-11-10 09:32:08 UTC by nobody
-
Using R = (3-2)/0.003 you come up with resistor value of 333 ohms, so use nearest available value like 330 ohm. Thats if you want to run them at 3ma, if not, then adjust accordingly.
They make little 3mm "low current" leds, and they don't look too bad at 2ma.
2009-11-10 05:14:42 UTC by kent_twt4
-
I think you just need to use the "Bin2ascii" sub, and make sure it disassembles the word value. Also needed is the XMIT_RS232 sub with both provided in the contributers alternate soft usart routine post.
Bin2ascii time.
2009-11-10 04:58:32 UTC by kent_twt4
-
HI,
How can i convert my binary values to strings so i can write to serial as text? i have a variable defined as a word, couting up and need to output it as a string.
DIM time as Word
XMIT_PRINT ("hello") ' works fine
XMIT_PRINT (time) 'doesnt work
Thanks in Advance.
2009-11-09 11:55:15 UTC by nobody
-
I'm using a Pic16F684, Quite a small little best.
I'm running on batteries with a low drop out reg of as low a voltage as I can. I'm powering LED's that use 2 volts +- 0.2 volts. When I sink the LED's with a I/O how much voltage does the I/O use.
So I can get some control of the 20 ma into the LED and I/O
I would like to control current +- 3 ma with all the tolerances
and hope to run on 3...
2009-11-09 06:23:29 UTC by lexdean
-
I encountered a problem with programming the 16F289. My code went over the 2K boundary and stopped working. Looking through the listing I found several instances of "far" calls (to page 2 of code) that were not preceded with the proper "pagesel" (BSF PCLATH,3) statement. I manually inserted these pagesel statements and got it to work. Seems like a compiler problem. Not sure what else could...
2009-11-07 03:54:07 UTC by ldelatorre
-
Ed, that's weird. Didn't see any of your code in the blue box using IE8 beta2. Using Firefox 3.53, the first line of the code is in a blue code box, then plain text, then back to blue code box for the last five lines. So maybe the browser has some effect, but haven't had any problems in posting from either browser.
The preview should show you exactly how the post is formatted. Be careful...
2009-11-04 03:03:05 UTC by kent_twt4
-
Kent, I cleaned up the PID to make it "look better" Also corrected a small error. I still can not get the code box to work right. What is the secret?
See:
'A PID controller with PWM output
'Neg_signed 02-21-09
'Use at your own risk!
'Chip model
#chip 16F88, 8
#config INTRC_IO
'Set the pin directions
dir portA.0 In 'input feedback on pin #17 from rc filter...
2009-11-04 00:23:54 UTC by elabudde
-
Kent, tuning a PID can be difficult. Here is how I do it. Set Iterm and Dterm to zero. Then adjust the Pterm until you get an overshoot to a small step input. Then use the Dterm ti damp out the overshoot. You only need to use the Iterm if there is a large steady state error. The steady state error with Iterm = 0 is about 1/Pterm so if Pterm is >100 you have less than 1% error. I wil...
2009-11-03 22:59:16 UTC by elabudde
-
Thanks Ed, it came through fine from the monitor by email option. To make it work on the forum post, the 101/010 icon needs to be clicked from the toolbar,....then paste or write code in the bluish box.
When fooling with your PID code, and Santiago's negative number library, it was taking some pretty wild swings when resolving to steady state. Also, made a very brief, and unsuccessful try...
2009-11-03 21:39:31 UTC by nobody