@Acetronics, as I sad, I have no experience with PicBasic Pro and other stuff. For an experimentated guy, 5 minutes are too much in order to write the missing "link" in the code. That is my feeling.
Happy new year!
@Acetronics, as I sad, I have no experience with PicBasic Pro and other stuff. For an experimentated guy, 5 minutes are too much in order to write the missing "link" in the code. That is my feeling.
Happy new year!
Just found these ones ...
http://www.qualityanswers.net/electr...505e61b391a003
http://www.elforum.ro/viewtopic.php?f=11&t=37981
yess ... too bad
Alain
Last edited by Acetronics2; - 28th December 2012 at 20:35.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Acetronics, if you have usefull ideas about my initial request, by my guest. Else, please, don't pollute my post with your amazing discoveries regarding old posts sent from others forums. You're so hard to follow...
Just a beginner myself, but seeing as you're still looking for help, I'll give it a stab.
I did a similar project to the one you referenced, except I used a 12F683. The main difference being that the 12F683 has one CCP pin, which means you can use the HPWM command and save a lot of headaches.
I also used an LM34 which does temp. in fahrenheit.
Here is the code which should be pretty easy to modify for your purpose:
Code:'This program uses a 12F683 chip wired as follows: 'Pin 2 (GPIO 5) - Status LED Pin 7 (GPIO 0) - to LM34 Temp sensor 'Pin 3 (GPIO 4) - Low Speed LED Pin 6 (GPIO 1) - high speed LED 'Pin 4 (GPIO 3) - Not used (MCLR) Pin 5 (GPIO 2) - pwm to fan mosfet ' Defines: DEFINE ADC_BITS 10 ' Set number of bits in result DEFINE ADC_CLOCK 3 ' Set clock source (3=rc) DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS ' Registers: TRISIO = 1 ANSEL = %00010001 ''Fosc/8 conversion speed for 4mHz processor, AN0 analog input CMCON0 = 7 ADCON0.7 = 1 'Right Justified (10 bit conversion) 'Variables: Raw_Temp var word Temp Var word Avg_Temp var word LED1 var GPIO.5 LED2 var GPIO.4 LED3 var GPIO.1 X var byte Raw_Temp = 0 Temp = 0 X = 0 'Program Start: LED1 = 1 'Always on status light START: LED2 = 0 LED3 = 0 HPWM 1,0,1000 Gosub GETDATA IF TEMP => 95 THEN GOTO MOTORSTART PAUSE 5000 GOTO START MOTORSTART: 'Starts motor at full speed HPWM 1,255,1000 PAUSE 1000 GOTO THIRTY THIRTY: hpwm 1,77,1000 LED2 = 1 LED3 = 0 GOSUB GETDATA IF TEMP < 92 THEN GOTO START IF TEMP > 105 THEN GOTO SEVENTY PAUSE 5000 GOTO THIRTY SEVENTY: HPWM 1,180,1000 LED2 = 1 LED3 = 1 GOSUB GETDATA IF TEMP < 100 THEN GOTO THIRTY IF TEMP > 115 THEN GOTO FULL PAUSE 5000 GOTO SEVENTY FULL: HPWM 1,255,1000 LED2 = 0 LED3 = 1 GOSUB GETDATA IF TEMP < 110 THEN GOTO SEVENTY PAUSE 5000 GOTO FULL GETDATA: Avg_Temp = 0 for x = 1 to 5 'Hysteresis by averaging 5 samples ADCIN 0,RAW_TEMP pause 5 Avg_Temp = Avg_Temp + Raw_temp pause 1000 next x TEMP = ((Avg_Temp/5)*49) / 100 'Farenheit conversion PAUSE 50 ' SEROUT GPIO.4,4,[" Temp ",#Temp,13,10] 'For debugging RETURN END
see next ...
Last edited by Acetronics2; - 31st December 2012 at 13:33.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hi, Maciu
I have ONE useful idea for you ...
Stop always begging and try some googling instead ...
BTW ... LM35 AND 12F675 remind me to have crossed such applications on the web ... may be not PBP ( ? - one sure in Mikro C - ) , but, as you are just begging for code ... Hex file will be more than enough !
Alain
PS: I hate lazy beggars ... but you already knew it
re PS : lazy ???
I prove it : http://www.picbasic.co.uk/forum/showthread.php?t=12794
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
the next part of the puzzle ...
http://jeanclaude.grimaldi.perso.sfr...ePWMdouble%29/
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks