i suggest to use pic16f628a: tmr0 as timer base, and tmr1 as asynchronous counter (RB6 input). Then use PORTA as a BCD OUTPUT, then CD4511 and finally 7 segment display. If only 2 or 3 digits, you can multiplex each number (using pins of port b)
Hi. BASCOM is only for atmel's microprocessors. But if you are already familiarized with BASIC, i suggest to use PROTON software for MICROCHIP (PIC) programming.
$regfile ="m16def.dat"$crystal =8000000Dim Multiplier As Byte
Dim Rpm As Word
Dim A As Byte
'8 Mhz / 64 = 125 Khz = 8 uS'8 uS x 31,250 = 250,000 uS = 0.25 S'Multiply with 4 = 1 S
Config Timer1 = Timer , Prescale =64
Multiplier =0
Timer1 =34286
Timer0 =0
Tccr0 =6
Enable Timer1
On Timer1 Multiply
Enable Interrupts
Do
Nop
Loop
Multiply:
Timer1 =34286
Incr Multiplier
If Multiplier =4Then
Multiplier =0
Rpm = Timer0 *60'Here is the RPM Value
Timer0 =0EndIfReturn