It might help if someone knew what DIL 18 was.
It might help if someone knew what DIL 18 was.
it's a 18 pins device with a DIL packageI'll bet it's a black one
![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Some are dark brown. Some even have writing on them - I wonder what this one is?
Another clueless student trying to fudge a class project by the looks of it.
Yes it's 16F88 .. and it's 18pin... BLACK in color comes with some wording on top of it!! but I use my finger's to rub it off anyway.. and now it's unknown chips , so I put DIL18
Thanks mat janssen , this is what I've done first... I'm sure somewhere must have coded wrongly.. I'll check tonite again!
Thanks!
Something like this is where LOOKUP2 comes in handy.
Change the delay periods in the table to suite your app.Code:@ DEVICE PIC16F88, WDT_OFF,INTRC_OSC,MCLR_OFF,BOD_ON,LVP_OFF,PWRT_ON,PROTECT_OFF DEFINE OSC 8 DEFINE NO_CLRWDT 1 OSCCON = %01110000 ' 8MHz CMCON = 7 ' disable analog comparators ANSEL = 0 ' disable A/D module, all digital X VAR WORD Index VAR BYTE LED VAR PORTB.0 TRISA = %00111100 ' RA2 to RA5 inputs for DIP switch PORTB = 0 TRISB = %11111110 ' RB0 for LED OPTION_REG = %11111111 WHILE OSCCON.2 = 0 ' wait for internal osc stable before moving on WEND Main: Index = (PORTA >> 2) & $0F ' Read DIP switch AND mask result LOOKUP2 Index,[200,300,400,500,600,700,800,900,1000,2000,_ 3000,4000,5000,6000,7000,8000],X HIGH LED PAUSE X LOW LED PAUSE X GOTO Main END
Thanks Bruce!
your code helps alot, and it looks much simpler then what I've done... thanks again!
Hi Bruce,
If I get this right . . translates to portA / 4 & %00001111 , what I do not get is what it means, are we doing math here to get a number ??? & = AND. What does it mean, Mask result?Code:Index = (PORTA >> 2) & $0F ' Read DIP switch AND mask result
I am really trying to get my head around how this works, because it works pretty sweet, Thanks
JS
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks