digital speedometer for bike (BASCOM-AVR)

Status
Not open for further replies.

max3811

Newbie level 2
Joined
Jul 12, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
hello all,

i m making small project, digital speedometer for my bike.
I want to use REED magnetic switch to detect the pulse from wheel.

But i m stuck in timer.
I want to use timer as it generate 1Sec interupt and another timer as counter to count pulse form reed switch.

can anyone help me to make code in bascom-avr.

thanks in advance.
ΩΩΩΩΩΩ
 

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)

hope give you an idea.
 

hi.
good suggestion.. i m also waiting somebody to answer this post.

i dont know much about pic controllers. and i have little command on BASCOM. (i have prepared some project in it).

can i use some platform like BASCOM for pic??

thanks chuzkin...
 



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.

Best regards.
 
Reactions: prafful

    prafful

    Points: 2
    Helpful Answer Positive Rating

This can be done without involving of uC
**broken link removed**

or

uC Based Speedometer with highlander uC 89C2051
https://www.engineerprojects.info/e...crocontroller-based-speedometer-cum-odometer/
https://kitsnspares.com/admin/pdffiles/Speedometer Cum Odometer.pdf
 
Last edited:

Try this :

Code Basic4GL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$regfile = "m16def.dat"
$crystal = 8000000
 
Dim 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 = 4 Then
Multiplier = 0
Rpm = Timer0 * 60                                           'Here is the RPM Value
Timer0 = 0
End If
Return

 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…