Hallo Leute,
ich benötige Hilfe von jemandem, der sich mit Platinen löten und der Programmierung eines ATMEGA8 auskennt.
Und um das geht es:
Vor längerer Zeit wollte ein Mitglied unserer Community den Lenkradsatelliten des Duster mit einem VDO Dayton 4150 verbinden und hat dafür eine eigene Schaltung gebaut. Diese Schaltung ist relativ unkompliziert und hat auch gut funktioniert.
Nach seinen Tests wollte er die fertige Platine mit programmiertem Atmega hier auch zum Kauf anbieten. Leider war seine letzte Nachricht, dass alles funktioneren würde und danach hat er sich nicht wieder gemeldet.
Auch PN bleiben unbeantwortet.
Den Schaltplan, das Platinenlayout und den Quelltext (in BASCOM) für den Atmega8 habe ich aus seinen Posts hier komplett vorliegen.
Wer von euch könnte mir die Platine zusammenbruzzeln oder den Atmega8 programmieren?
Die Mini-ISO-Buchsen und Stecker könnte ich auch selber an die Kabel anklöppeln - ich kann nur nicht so eine Platine löten, geschweige denn den ATMEGA8 programmieren.
So ein kleines Gehäuse, in dem die Platine auf dem Foto steckt, habe ich sogar da.
Das Ganze muss natürlich nicht uneltgeltlich geschehen.
Liebe Grüße
t-bird
Anbei noch der Quellcode:
'------------------------------------------------------------------------------
' OUTC : portc.0-portc.2
' INC : portc.3-portc.5
' UART : RxD = portd.0 TxD = portd.1
' OUTD : portd.2-portd.7
' 2011 : by DerNeo
'------------------------------------------------------------------------------
$regfile = "m8def.dat" ' Atmega 8
$crystal = 1000000 ' Takt intern 1MHz
$framesize = 40
declare sub Matrix()
declare function NewKey() As byte
declare function LowPin() As byte
dim Key As byte
dim oldPos As byte ' Merkt sich die Position des Scrollrades
call Matrix()
do
Key = NewKey()
if Key = 0 Then
PortD = &B00000000
waitms 25
else
select case Key
case 5 : PORTD.7 = 1 'TASTE UNTEN = ENTER
case 6 : PortD.4 = 1 'VOL +
case 7 : Portd.3 = 1 'VOL -
case 9 : PORTD.7 = 1 'SOURCE RECHTS = ENTER
case 10 : Portd.7 = 1 'MUTE = ENTER
case 11 : Portd.5 = 1 'SOURCE LINKS = MODE
case 44 : Portd.4 = 1 : waitms 150 'RAD NACH UNTEN
case 88 : Portd.6 = 1 : waitms 150 'RAD NACH OBEN
end select
end if
loop
end
sub Matrix()
config Portc.0 = output : Portc.0 = 1 ' Row 1 BRAUN
config Portc.1 = output : Portc.1 = 1 ' Row 2 ROT
config Portc.2 = output : Portc.2 = 1 ' Row 3 SCHWARZ
config PORTC.3 = input : PORTC.3 = 1 ' Col 1 GRÜN
config PORTC.4 = input : PORTC.4 = 1 ' Col 2 BLAU
config PORTC.5 = input : PORTC.5 = 1 ' Col 3 GELB
ddrd = &B11111100
end sub
function NewKey() As byte
local Col As byte , Row As byte , Pos As byte
Col = 0 : Row = 0 : NewKey = 0
Portc.0 = 0 : Col = LowPin() : Portc.0 = 1
if Col > 0 then
shift Row , left , 2 : Pos = Col + Row
if oldPos <> Pos then
select case oldPos
case 1
If Pos = 2 then NewKey = 44 ' RUNTER
If Pos = 3 then NewKey = 88 ' RAUF
case 2
If Pos = 1 then NewKey = 88 ' RAUF
If Pos = 3 then NewKey = 44 ' RUNTER
case 3
If Pos = 1 then NewKey = 44 ' RUNTER
If Pos = 2 then NewKey = 88 ' RAUF
end select
oldPos = Pos : exit function
end if
end if
Row = 1 : Portc.1 = 0 : Col = LowPin() : Portc.1 = 1
if Col > 0 Then
shift Row , left , 2 : NewKey = Col + Row : exit function
end if
Row = 2 : Portc.2 = 0 : Col = LowPin() : Portc.2 = 1
if Col > 0 Then
shift Row , left , 2 : NewKey = Col + Row : exit function
end if
end function
function LowPin() as Byte
LowPin = 0
if Pinc.3 = 0 then
LowPin = 1
elseif Pinc.4 = 0 then
LowPin = 2
elseif Pinc.5 = 0 then
LowPin = 3
end if
end function