Keep it up and you'll end up like Jon.
I think I'm offended!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Keep it up and you'll end up like Jon.
I knew there was something i was forgetting lolObviously, you've forgotten whose thread you're posting in. Keep it up and you'll end up like Jon.
Not sure myself yet lmao good shot tumbleweed got both with one line lolI think I'm offended!
CONFIG fOSC = INTIO67 ' Internal oscillator, IO on pins 6 and 7
I assume PORTC.6 and PORTC.7 are connected to your Green1 and Pwr_On LEDS? Which one is which?but when the PIR2 TRIPS, THE PORTC.6 & 7 come on as well but not supposed to
device = 18F26K22
clock = 64
// optional - wait for intosc freq stable bit (the module defaults to not waiting)
'#option _INTOSC_IOFS_WAIT = true
include "intOSC.bas"
Rest of the gunk goes here
device = 18F1320
clock = 8
include "IntOSC.bas"
include "USART.bas"
include "EEPROM.bas"
include "Convert.bas"
SetBaudrate(br19200)
Write("Program starting...",13,10)
while true
Write("High",13,10)
delayms(500)
Write("Low",13,10)
delayms(500)
wend
Not if your code isn't telling them too.BUT portc.6 & 7 decide to come on as well
basic code
DEVICE = 18F43k20 ' Tell the compiler what chip we are using
CLOCK = 20 ' Tell the compiler what we will be setting the clock to (Mhz)
CONFIG MCLRE = OFF
CONFIG fOSC = INTIO67 ' Internal oscillator, IO on pins 6 and 7
CONFIG boren = off
'INCLUDE "INTOSC8.bas"
'INCLUDE "InternalOscillator.bas"
INCLUDE "SetDigitalIO.bas"
INCLUDE "Utils.bas"
DIM x AS BYTE
DIM Time AS LONGWORD
DIM Et_time AS LONGWORD
//INPUTS
DIM Mexi AS portA.0
DIM Bullit AS portA.1
DIM Master_Swt AS portE.0
DIM Position1 AS portB.0
DIM Position2 AS portB.1
DIM Position3 AS portB.2
DIM Position4 AS portB.3
DIM Position5 AS portB.4
DIM Position6 AS portB.5
DIM Position7 AS portB.6
DIM Position8 AS portB.7
DIM Position9 AS portD.0
DIM Position10 AS portD.1
//TIME SELECT
DIM Time1 AS portA.2
DIM Time2 AS portA.3
DIM Time3 AS portA.4
DIM Time4 AS portA.5
//OUTPUTS
//PLAYER POSITIONS leds
DIM pLAYER1 AS PORTC.0
DIM pLAYER2 AS PORTC.1
DIM pLAYER3 AS PORTC.2
DIM pLAYER4 AS PORTC.3
DIM pLAYER5 AS PORTC.4
DIM pLAYER6 AS PORTC.5
DIM pLAYER7 AS PORTC.6
DIM pLAYER8 AS PORTC.7
DIM pLAYER9 AS PORTD.2
DIM pLAYER10 AS PORTD.3
//TIMING LEDS
DIM Green1 AS portD.4
DIM Green2 AS portD.5
DIM Yellow1 AS portD.6
DIM Yellow2 AS portD.7
DIM MST_LED AS PORTE.1
//HLVD LEDS
DIM Low_bat AS portA.6
DIM Pwr_on AS portA.7
SUB HLVD()
HLVDCON =%00011100 'see section 22.0 for setup and table 26-4 for voltage setting
'set to 4 volts in this case 11100 = 3.1 volts
PIR2.bits(2) = 0
IF PIR2.bits(2) = 1 THEN 'check HLVD interrupt
Green1= 0 'LED = ON
PIR2.bits(2) = 0 'clear HVLD interrupt
ELSE
Green1= 1 'LED = OFF
END IF
TOGGLE (Pwr_on)
DELAYMS(50)
END SUB
//HLVDCON =%00011100 'see section 22.0 for setup and table 26-4 for voltage setting
'set to 4 volts in this case 11100 = 3.1 volts
//PIR2.bits(2) = 0
{
portC.0 to C.7 = blue player leds players 1 to 8
portD2 & 3 = blue player leds players 9 to 10
portA.6 & 7 = HLVD A.6 = LOW battery A.7 = Pwr on
portD.4 & 5 = greem leds timming
portD.6 & 7 = Yellow leds
portE.1 = red master switch led
}
SUB ET ()
pLAYER1=1
DELAYMS(1000)
TOGGLE(pLAYER1)
DELAYMS(500)
IF Time1=0 THEN Et_time=500 END IF //port A.2
IF Time2=0 THEN Et_time=750 END IF //port A.3
IF Time3=0 THEN Et_time=1000 END IF //port A.4
IF Time4=0 THEN Et_time=1500 END IF //port A.5
END SUB
//THIS routine cycles the LEDS off/on as per ET select routine
SUB Time_Countdown() //1000ms = 1 second x 5 Green, Green, Yellow, Yellow, RED
FOR x = 0 TO 7 //2500ms total on time1
Green1=0 //3750ms time2
DELAYMS(1000) //5000ms time3
Green1=1 //7500ms on time4
DELAYMS(1000)
NEXT
MST_LED= 1
DELAYMS(500)
TOGGLE(MST_LED)
DELAYMS(300)
END SUB
setalldigital
INPUT (Time1)
INPUT (Time2)
INPUT (Time3)
INPUT (Time4)
OUTPUT(pLAYER1)
OUTPUT(pLAYER2)
OUTPUT(pLAYER3)
OUTPUT(pLAYER4)
OUTPUT(pLAYER5)
OUTPUT(pLAYER6)
OUTPUT(pLAYER7)
OUTPUT(pLAYER8)
OUTPUT(pLAYER9)
OUTPUT(pLAYER10)
OUTPUT(Green1) //portd.4
OUTPUT(Green2) //portd.5
OUTPUT(Yellow1) //portd.6
OUTPUT(Yellow2) //portd.7
'OUTPUT(Pwr_on) //porta.7
'OUTPUT(Low_bat) //porta.6
OUTPUT (MST_LED)
'Trisa=%00000000
'TrisB=%11111111 'make all INputs
'TrisC=%00000000 'make all outputs
'Trisd=%00000000
HLVDCON =%00011100 'see section 22.0 for setup and table 26-4 for voltage setting
'set to 4 volts in this case 11100 = 3.1 volts
PIR2.bits(2) = 0
Position1=1
Position2=1
Position3=1
Position4=1
Position5=1
Position6=1
Position7=1
Position8=1
Position9=1
Position10=1
pLAYER1 = 0
pLAYER2 = 0
pLAYER3 = 0
pLAYER4 = 0
pLAYER5 = 0
pLAYER6 = 0
pLAYER7 = 0
pLAYER8 = 0
pLAYER9 = 0
pLAYER10 =0
'Pwr_on =0
MST_LED=0
Green1 = 1 //OFF
Green2 = 1
Yellow1 = 1
Yellow2 = 1
Time = 50
'Low_bat = 0
'Pwr_on = 0
MST_LED = 0
Time1=1
Time2=1
Time3=1
Time4=1
//et_time =
WHILE TRUE
IF Position1 = 0 THEN
TOGGLE(pLAYER1)
DELAYMS(50)
ELSE Position1 = 1
END IF
IF Position2 = 0 THEN
TOGGLE(pLAYER2)
DELAYMS(50)
ELSE Position2 = 1
END IF
IF Position3 = 0 THEN
TOGGLE(pLAYER3)
DELAYMS(50)
ELSE Position3 = 1
END IF
IF Position4 = 0 THEN
TOGGLE(pLAYER4)
DELAYMS(50)
ELSE Position4 = 1
END IF
IF Position5 = 0 THEN
TOGGLE(pLAYER5)
DELAYMS(50)
ELSE Position6 = 1
END IF
IF Position6 = 0 THEN
TOGGLE(pLAYER6)
DELAYMS(50)
ELSE Position6 = 1
END IF
IF Position7 = 0 THEN
TOGGLE(pLAYER7)
DELAYMS(50)
ELSE Position7 = 1
END IF
IF Position8 = 0 THEN
TOGGLE(pLAYER8)
DELAYMS(50)
ELSE Position8 = 1
END IF
IF Position9 = 0 THEN
TOGGLE(pLAYER9)
DELAYMS(50)
ELSE Position9 = 1
END IF
IF Position10 = 0 THEN
TOGGLE(pLAYER10)
DELAYMS(50)
ELSE Position10 = 1
END IF
' Green1=1 //portd.4
'Green2 = 1 //portd.5
'Yellow1=1 //portd.6
'Yellow2=1//portd.7
'Pwr_on=0 //porta.7
'Low_bat=0 //porta.6
{
DELAYMS(500)
MST_LED = 1
DELAYMS(1000)
TOGGLE (MST_LED)
DELAYMS(500)
ET()
Time_Countdown()
}
HLVD()
WEND
[code/QUOTE]
Causes problems Mike, i used to do that with my sister while she gurgled in her cot, now she wants access to my parts bin!! I didnt drink coffee then and didnt have a teddy!! Rod for my own back lolIn my earlier days when I had a bug, I'd describe how the code worked to anyone (Teddy, coffee cup etc.) that would listen (or not). The act of describing how code works will (almost always) make you realise where the bug is. I believe this method is now called "Rubber Ducking".
Mike.
Position1=1
Position2=1
Position3=1
Position4=1
Position5=1
Position6=1
Position7=1
Position8=1
Position9=1
Position10=1
Time1=1
Time2=1
Time3=1
Time4=1
IF Position1 = 0 THEN
TOGGLE(pLAYER1)
DELAYMS(50)
ELSE // you can only get here if Position1 = 1 already, so there's no point in this ELSE code
Position1 = 1 // anyway, YOU CAN'T WRITE TO AN INPUT PIN
I know others have installed it on win8.1 with no issues. Is this the full version or the free SE version?Any known issues with SF and win 8.1? my system refuses point blank to install it
Maybe try again, esp if you don't remember how you registered. I know new users have been approved as recent as May 1.Does anyone actually approve forum applications at SF? i joined 5-6 weeks ago and still not approved