Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Re: CF card van Avisaro Kategorie: Programmierung Basic (von Hans - 27.11.2005 14:05)
 Als Antwort auf Re: CF card van Avisaro von Hans - 22.11.2005 21:44
Hans nutzt:  CC1-M-Unit V1.2/2.0
The continuation of the Avisaro memory card
Unfortunately it is really broken

I want to try it once more
By ordering a new one

And than program it with I2C
According to the gentelmen of Avisaro is this better

But I dont understand anything of the I2C
Is there anyone who could help me to convert this program for the M-unit 2.0

Um den I2C Busmaster zu progrmmieren, kann folgender Code ggf. weiterhelfen:
// Diese Funktion sendet Daten an das Avisaro-Modul
// ------------------------------------------------
// Input:
// device_address ---> I2C-Adresse des Avisaro-Moduls
// *data ---> Zeigt auf den Anfang der zu versendenden Daten
// size ---> Anzahl der Daten die zu versenden sind
void I2C_Send (UINT8 device_address, UINT8 *data, int size)
{
// Setze START Bedingung
I2C_start();
// Sende die Geräteadresse des Moduls
I2C_out_byte (device_address<<1);
// Warte Antwort ab
I2C_wait_ack();
// Für alle Daten...
while (size--)
{
// Sende ein Byte
out_byte (*data);
data++;
// Warte Antwort ab
I2C_wait_ack();
}
// Fertig, setze STOP Bedingung
I2C_stop();
}

I only want data
Tijd
time
Datum
date
Jaar
Year
AND 3 BYTE variabele Var1,Var2,Var3
I hope that some one can help me with this
Thanks for the help






>
> Thank you very much
>
> I cant wait to try it out
> but first i have to buy a new memory card
> I keep you informed
>
> Hans
>
> > Hello again,
> > I have changed the program, taking great care of where the “CARRIAGE RETURN” and “LINE FEED” are needed.
> > I donÂ’t understand the 1st answer from Avisaro but I think it has something to do with the + + +, I have also changed this in the program.
> > Greetings,
> > H.J. Windt
> >
> > '****************** SETUP ******************'
> > pause 200                                           'Just a pause of 4sec.'
> > put 0                                               'Needed because of a bug in the C-Control I v2.0 rs232'
> > print"at+create test.txt"                           'Create test.txt /with cr&lf'
> > pause 150                                           'Pause 3sec.'
> > pause 50                                            '*Subroutine must still be written for receiving OK or ERROR*'
> > print"at+close"                                     'Close test.txt /with cr&lf'
> > pause 50                                            '*Subroutine must still be written for receiving OK or ERROR*'
> > '*******************************************'
> > '***************** PROGRAM *****************'
> > #start
> > print"at+append test.txt"                           'Open test.txt for appending data /with cr&lf'
> > pause 50                                            '*Subroutine must still be written for receiving OK or ERROR*'
> > print"at+datastream"                                'Type of data is datastream /with cr&lf'
> > pause 50                                            '*Subroutine must still be written for receiving OK or ERROR*'
> > print"The quick brown fox jumps over the lazy dog." 'datastream /with cr&lf'
> > print"The Avisaro Compact Flash Box is GREAT!"      'datastream /with cr&lf'
> > print"Testend?";                                    'Last datastream /NO cr&lf'
> > pause 50                                            'Pause 1sec.'
> > put&h2b                                             '+ /NO cr&lf >> could also be print"+";??'
> > pause 50                                            'Pause 1sec.'
> > put&h2b                                             '+ /NO cr&lf >> could also be print"+";??'
> > pause 50                                            'Pause 1sec.'
> > put&h2b                                             '+ /NO cr&lf >> could also be print"+";??'
> > pause 50                                            '*Subroutine must still be written for receiving OK or ERROR*'
> > #end_loop
> > beep 4,2,4: beep 4,2,4
> > goto end_loop
> > '*******************************************'
>

 Antwort schreiben

Bisherige Antworten:

Re: CF card van Avisaro (von Windt H.J. - 27.11.2005 16:05)
    Re: CF card van Avisaro (von Hans - 27.11.2005 19:00)
        Re: CF card van Avisaro (von Windt H.J. - 30.11.2005 15:32)
            Re: CF card van Avisaro (von Windt H.J. - 30.11.2005 21:58)
                Re: CF card van Avisaro (von Hans - 30.11.2005 22:35)