|
01/28/2005, 06:56 PM | #26 |
Registered Member
Join Date: Aug 2002
Posts: 1,204
|
[ c o d e ]
[ / c o d e ] Without the spaces, does preformatted. Code:
Like this: (. \ \ | \ |___(\--/) __/ ( . . ) "'._. '-.O.' '-. \ "|\ '.,,/'.,,mrf |
01/28/2005, 07:29 PM | #27 |
Premium Member
Join Date: Nov 2000
Location: BC. Canada.
Posts: 14,351
|
oh nice.. I did not know that.. Well on here at least. I knew about that on the CCS forum. Did I think that it would do it here? no..
Code:
#fuses HS,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT #fuses MCLR,CCPB2, NODEBUG,NOLVP,NOCPD,NOWRT #use delay(clock = 4000000) #define INTERRUPT_DELAY_TMR1 0x7FF9 //250ms prescale of 8 #define ON TRUE int COUNTER, SECONDS, MINUTES, HOURS, DAYS; int LED_intensity = 0; BOOLEAN UP = TRUE; BOOLEAN LED_cycle = TRUE; void main(void){ delay_ms(500); setup_timer_1( T1_INTERNAL | T1_DIV_BY_8); output_low(PIN_B2); setup_ccp1(ccp_pwm); set_pwm1_duty(1); enable_interrupts(INT_TIMER1); enable_interrupts(GLOBAL); while(1); } /************************INTERRUPTS****************************/ #int_TIMER1 void TIMER1_isr(){ set_timer1( get_timer1() + INTERRUPT_DELAY_TMR1); if (++counter >= 4){ counter = 0; output_toggle(PIN_B0); if(++seconds >= 60){ seconds = 0; if (++minutes >= 60){ minutes = 0; if(++hours >= 24){ hours = 0; if(LED_cycle == UP){ LED_intensity = LED_intensity + 10; set_pwm1_duty(LED_intensity); } else{ LED_intensity = LED_intensity - 10; set_pwm1_duty(LED_intensity); } if(++days >= 14){ days = 0; LED_cycle ^= 1; } } } } } }
__________________
Darren Beauty fades.... Stupid is forever...... Current Tank Info: 34 Gal Solana with some lights.. and pumps that make water move. And fish... Last edited by DJ88©; 01/29/2005 at 04:25 PM. |
07/30/2005, 11:50 PM | #28 |
Registered Member
Join Date: Mar 2002
Location: Iowa
Posts: 9
|
I'd like to know how your controler is comming along????
__________________
The only easy day was yesterday...... Current Tank Info: 20L, 4x65w PC, Aquac Remora, Mated Percula Clowns, SPS and Soft |
04/17/2006, 05:27 PM | #29 |
Registered Member
Join Date: Dec 2003
Posts: 204
|
any updates? sounds like a good one.
__________________
[URL=https://matchnow.life]Real-life Females[/URL] |
11/04/2012, 01:45 AM | #30 |
Registered Member
Join Date: Oct 2012
Posts: 2
|
hi i have atlas pH stamp, arduino duemilanove.
i want to trigger some LEDs, buzzer,when certain pH is reached. i also want to display the pH reading on LCD display. please help me with the code. any reference would also be really helpful. this is my first time doing such project. thanks |
|
|