Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
|
Hello,
in the code of the ACPRD are functions used to read and write in the EEPROM memory (readItemEETS and writeItemEETS). The registers used in these functions don't exist in the D60A. Is it also possible on the D60A to read and write to the EEPROM to save and restore some variables? Regards, Luc Dietvorst |
|
|
|
On Mon, 10 Feb 2003 12:33:33 +0400 "LUC DIETVORST" <> wrote: > Hello, > > in the code of the ACPRD are functions used to read and write in the > EEPROM memory (readItemEETS and writeItemEETS). > > The registers used in these functions don't exist in the D60A. Is it > also possible on the D60A to read and write to the EEPROM to save and > restore some variables? Luc, NV memory in the D60A behaves totally different. To write a byte (in accu B) to D60A EEPROM you could try something like this (value in A, address in Y): ldab 0,y ; check if cell is already erased cmpb #$ff beq _peewrite ; _peeerase ldab #%10010110 ; BULKP 0 0 BYTE !ROW ERASE EELAT !EEPGM stab EEPROG ; Prepare Byte Erase staa 0,y ; Dummy write to destination address inc EEPROG ; Set EEPGM to start Erase bsr wait10ms ; delay 10 ms stab EEPROG ; Reset EEPGM ; _peewrite cmpa #$ff ; skip write if Value2write=$ff beq _peeDone ldab #%10000010 ; BULKP 0 0 !BYTE !ROW !ERASE EELAT !EEPGM stab EEPROG ; Prepare Byte Write staa 0,y ; Write value to destination address inc EEPROG ; Set EEPGM to start Write bsr wait10ms stab EEPROG ; Reset EEPGM ; _peeDone ldab #%10000000 ; Default state (EELAT=0) stab EEPROG Happy HC(S)12ing! Oliver ----------------------------------------------------- *** Oliver Thamm's HC12 Web *** http://hc12web.de *** ----------------------------------------------------- |
|
|
|
On Mon, 10 Feb 2003 22:00:57 +0100 Oliver Thamm <> wrote: > (in accu B) this is a typo, please ignore/delete Oliver |
|
|
|
Again, trying to not reinvent the wheel, does anyone have an HC12, HC11, (or pretty much anything else, for that matter) primitive for implementing the arctangent? Thanks... jmk ----------------------------------------------- James M. Knox TriSoft ph 512-385-0316 1109-A Shady Lane fax 512-366-4331 Austin, Tx 78721 ----------------------------------------------- |
|
|
|
> Again, trying to not reinvent the wheel, does anyone have an HC12, HC11, > (or pretty much anything else, for that matter) primitive for implementing > the arctangent? http://www.netlib.org/cephes/index.html Good luck Edward > Thanks... > jmk > > ----------------------------------------------- > James M. Knox > TriSoft ph 512-385-0316 > 1109-A Shady Lane fax 512-366-4331 > Austin, Tx 78721 > ----------------------------------------------- |
|
Most compiler packages for HC11/HC12 today come along with source code for the ANSI library: you will find there implementations. Have a look. Erich > -----Original Message----- > From: James M. Knox [mailto:] > Sent: Dienstag, 11. Februar 2003 00:21 > To: > Subject: [68HC12] Arctan (Cordics?) > > Again, trying to not reinvent the wheel, does anyone have an HC12, HC11, > (or pretty much anything else, for that matter) primitive for > implementing > the arctangent? > > Thanks... > jmk > > ----------------------------------------------- > James M. Knox > TriSoft ph 512-385-0316 > 1109-A Shady Lane fax 512-366-4331 > Austin, Tx 78721 > ----------------------------------------------- > > -------------------------------------------------------- > To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu |