Search found 12 matches

by MrDEB
Thu Jul 02, 2009 12:28 pm
Forum: Compiler
Topic: LED candle using PWM
Replies: 0
Views: 1797

LED candle using PWM

http://www.youtube.com/watch?v=Mda9B3HAbVQ

planning on using red, blue and green LEDs behind an obscure yellow glass
by MrDEB
Thu Jul 02, 2009 1:53 am
Forum: Compiler
Topic: newbi trying to declare 3 variables
Replies: 5
Views: 2701

here is a GREAT looking candle flicker

I toyed with several different things but after playing with RandomVal the code works very well. It simulates a real candle flicker. changing the subtraction value from RandomVal will alter the effect. I had -5 for the red_duty but changed to 25. looks better. I left all the orginal code but added /...
by MrDEB
Wed Jul 01, 2009 11:59 am
Forum: Compiler
Topic: newbi trying to declare 3 variables
Replies: 5
Views: 2701

include is there??

the include files are declared in the beginning?
Include "IntOSC8.bas"
Include "RandGen.bas"

should they be located elsewhere??
like after the DIM statements??
I have tried several different ways to get ms as a 3 part variable but havn't got it right.
could be the include is in wrong place??
by MrDEB
Tue Jun 30, 2009 2:00 pm
Forum: Compiler
Topic: newbi trying to declare 3 variables
Replies: 5
Views: 2701

newbi trying to declare 3 variables

tried several different things but keep getting syntax errors like identifier expected?? what I want to do is have 3 variables (red, green, blue) then in the prg the variables are inc or dec this code is a PWM with all three LES on at same time but increase/decrease at different times but they all a...
by MrDEB
Mon Jun 29, 2009 3:57 am
Forum: Compiler
Topic: get error in yellow
Replies: 3
Views: 2052

hey thanks doj

now the syntax is correct.
hopefully the code will do as planned.
will try out tomorrow nite.
I may need to get some photo transistors as I have none in my parts boxes.
by MrDEB
Sun Jun 28, 2009 6:23 pm
Forum: Compiler
Topic: get error in yellow
Replies: 3
Views: 2052

get error in yellow

variable not initialized. how does one initialize a variable. } // your main code would look like this Device = 18F1320 Clock = 8 // 8MHz clock Config OSC = INTIO2, WDT = OFF, LVP = OFF Dim day As Byte Dim nite As Byte Dim light As Byte Dim checkPIR As Byte Dim PlaySound As Byte dim timeout as byte ...
by MrDEB
Fri Jun 26, 2009 11:57 pm
Forum: Compiler
Topic: Declaring a string
Replies: 0
Views: 1654

Declaring a string

trying to make a string (variable?) I am new to this programing. I want to use ms(2) (3 elements) than denote the LED color In the program ms is incremented then decremented. The code I have posted will turn on all 3 LEDs and using the PWM they start out dim until full brightness then dim to off I w...
by MrDEB
Thu Jun 25, 2009 1:00 pm
Forum: Compiler
Topic: close all or close page
Replies: 1
Views: 1559

close all or close page

I am wondering if the code from any pages other than the one on the screen are compiled as well when hitting F10 as far as the modules how come some are editable and some are not?? when trying to change or edit a module I have to copy n paste then edit then remember to delete the other copied module...
by MrDEB
Mon Jun 22, 2009 9:19 pm
Forum: Compiler
Topic: timer worked before?
Replies: 0
Views: 1697

timer worked before?

I had this timer code working but now it dosn't want to work?? I made several changes as I only need 2 timers. end result I am after is a 20 minute low time then a short high, 20 minute low // [email protected] 8MHz - they are just used here for clarity... Device = 18F1320 Clock = 8 Include "ISRTimer.bas" in...
by MrDEB
Sun Jun 21, 2009 9:44 pm
Forum: Modules
Topic: where is intosc8.bas
Replies: 0
Views: 1965

where is intosc8.bas

have two program codes that ask for this in an INCLUDE statement
but where is this?
note I am new at this PIC programming.
trying to get a PWM code working as well as a 20 minute timer.
both prgs are unrelated to each other
by MrDEB
Sat Apr 25, 2009 3:01 am
Forum: Compiler
Topic: how does one create multi-port arrays?
Replies: 1
Views: 1662

try something different??

DEVICE = 18F1320 CLOCK = 8 // 8MHz clock CONFIG OSC = INTIO2, WDT = OFF, LVP = OFF DIM NOT_RBPU AS INTCON2.7 DIM TMR1IE AS PIE1.0 DIM TMR1IF AS PIR1.0 DIM TMR1 AS TMR1L.AsWord DIM Speaker AS PORTB.3 DIM SpeakerTris AS TRISB.3 DIM Amp AS PORTA.1 // turns on amp power DIM AmpTris AS TRISA.1 DIM dip1 ...
by MrDEB
Fri Apr 24, 2009 7:15 pm
Forum: Compiler
Topic: how does one create multi-port arrays?
Replies: 1
Views: 1662

how does one create multi-port arrays?

am trying to intergrate 4 multi port variables using a 4 pos dip switch to change the variable SPEED Thanks to Pommie, Blueroom and be80be over at electrotech I have gotton this far. Please note that this programming is all new to me. Did some on the Comodore computers years ago. I want to add to SP...