Welcome, Guest. Please login or register.

Author Topic: rev counter adjusting  (Read 1396 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline amiga4001Topic starter

  • Hero Member
  • *****
  • Join Date: Sep 2004
  • Posts: 537
    • Show all replies
rev counter adjusting
« on: August 05, 2007, 06:29:08 PM »
I purchased an electronic revcounter for my car.
It needs to be readjusted so it will show the correct rpm.
It works by taking an impulse from the distributor.
Every impulse represents a certain amount off rpm.
I was thinking about some kind off relay powered by either an amiga500 or a commodore 64.
This way I can set the pulses and see what the gauge reads.
But where to find a schematic for a relaycard?
Nothing fancy just one relay will do nicely.
 

Offline amiga4001Topic starter

  • Hero Member
  • *****
  • Join Date: Sep 2004
  • Posts: 537
    • Show all replies
Re: rev counter adjusting
« Reply #1 on: August 16, 2007, 09:57:21 PM »
Well this rev counter has a adjustment which you can set to meet the resistance in the revcounter.
That is connections,aging electricalparts in the counter and the resistance off the moving parts inside.
I now have a working setuo with my C64 to power the gauge.
First time in basic:
10 poke 56579,1 to initialize the gate I believe.
20 poke 56577,0
30 poke 56577,1
40 a=a+a;?a
50 goto 20

This way I gat maximum off 600 rev/min on the revcounter.
Basic seems to slow...for nice adjustment.

So in assembler?:

c000 lda #$01
c002 sta $dd03
c005 lda#$00
c007 sta $dd01
c00a jsr $c020
c00d lda #$01
c00f sta $dd01
c012 jsr $c020
c015 jmp$c005

c020 ldx #$00
c022 inx
c023 bne $c022
c025 rts


With this I get about 4500 rev/min on my gauge very usable but I need to know the pulses the c64 gives to set the gauge.
So a a=a+1 and a print a in assembler???


 

Offline amiga4001Topic starter

  • Hero Member
  • *****
  • Join Date: Sep 2004
  • Posts: 537
    • Show all replies
Re: rev counter adjusting
« Reply #2 on: August 17, 2007, 06:52:24 AM »
Dragracing?That is an idea!
No it is for an oldtimer a triumph gt6 mk1.
I can let a company do the adjusting but there is no fun in there and I want to learn some assembler on the C64 just for the fun.
On one side it is very simple and on the other...
The program skurk provided doesn't wan't to work gauge only moves a tiny bit.
Maybe beacuse i replaced the loop with a jmp command?
Or it is going to fast for the gauge or the fet which is powering the gauge.
Still I have no working program to drive my gauge and measure the pulses.
Is there no simple way to count an amount off loops?
And why does loop: don't work in the monitor off the powercartridge?
It's used in all C64 tutorials on machinelanguage.