I-8000 library reference
[Index] [Back]

  1. The library of I-8000 series support two memory model :

    2. (1)8000S.LIB is for SMALL MODEL.(TC/BC++/MSC/MSVC++)
    (2)8000L.LIB is for LARGE MODEL.(TC/BC++/MSC/MSVC++)

  2. All the function declaration are put on the file : 8000.h , so in the beginning of program please add one line :
    #include "8000.h" .
    (8000.h and 8000S.lib, 8000L.lib all put on the directory "DEMO\LIB\".)
Index
  1. Functions for COM PORTS
  2. Functions for EEPROM
  3. Functions for NVRAM & RTC
  4. Functions for LED & 5DigitLed
  5. Functions for Flash Memory
  6. Functions for Timer & WatchDogTimer
  7. Functions for Files
  8. Functions for Connect to I-7000 modules
  9. Functions for Programmable IO Pin
  10. Functions for Others(MISC)
  11. Functions for I-8000 only
  12. Constant defined in 8000.h

  13. Get the newest 7188/7188x/8000 series library
[Index] [Back]
[I-8000 library reference] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.
Any question please E-Mail to:ICPDAS_SERVICE


MiniOS7 Library reference : ChangeToSlot

MiniOS7 Library reference
ChangeToSlot()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ChangeToSlot |  |  | * |  |  |

  • Description:
    Set COM0 connect to one of the 4/8 slots.(Slot index is begin with 0.)
  • Declaration:
    void ChangeToSlot(int slot);
  • Input Parameter:
    • slot:
      for 4 slots(84XX): 0-3.
      for 8 slots(88XX): 0-7.
  • Return Value:
    None.
  • Demo program:
    None.
[Index] [Back]
[MiniOS7 Library reference : ChangeToSlot] Ver.1.3.1
Final update date:[03/26/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ClearCom

ClearCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ClearCom | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
ClearCom0 |  |  | *1 |  |  |
ClearCom1 | *2 | *1 | *1 | *1 | * | *
ClearCom2 | *2 | *1 | *2 | *1 | * | *
ClearCom3 | *1 | *3 | *2 | *2 | * | *
ClearCom4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Clear all data on input buffer of COM port.
  • Declaration:

    • int ClearCom(int port);
    int ClearCom0(void);
    int ClearCom1(void);
    int ClearCom2(void);
    int ClearCom3(void);
    int ClearCom4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    Others return NoError.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ClearCom] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ClearSystemKey

ClearSystemKey()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ClearSystemKey |  |  | * |  |  |

  • Description:

    • Clear all data in System key input buffer.
  • Declaration:

    • void ClearSystemKey(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • demo\syskey\syskey.c
[Index] [Back]
[MiniOS7 Library reference : ClearSystemKey] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ClearTxBuffer

ClearTxBuffer()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ClearTxBuffer | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
ClearTxBuffer0 |  |  | *1 |  |  |
ClearTxBuffer1 | *2 | *1 | *1 | *1 | * | *
ClearTxBuffer2 | *2 | *1 | *2 | *1 | * | *
ClearTxBuffer3 | *1 | *3 | *2 | *2 | * | *
ClearTxBuffer4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Clear all data on output buffer of COM port. So these data will not be send out.
  • Declaration:

    • int ClearTxBuffer(int port);
    void ClearTxBuffer0(void);
    void ClearTxBuffer1(void);
    void ClearTxBuffer2(void);
    void ClearTxBuffer3(void);
    void ClearTxBuffer4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • Only ClearTxBuffer() has return value.
    On success return NoError.
    If prot is not 0/1/2/3/4 return PortError(-1).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ClearTxBuffer] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ClockHighLow

ClockHighLow()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ClockHighLow | * | * | * | * | * | *

  • Description:

    • Send a clock from "sclk" pin. Set to high first, then set to low.
  • Declaration:

    • void ClockHighLow(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ClockHighLow] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ClrSlotInt

ClrSlotInt()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ClrSlotInt |  |  | * |  |  |

  • Description:

    • I-88xx series has 8 slots for add-on modules. The last 4 slots share the same interrupt signal.
    Call ClrSlotInt() can clear the interrupt signal come from that slot.
  • Declaration:

    • void ClrSlotInt(int slot);
  • Input Parameter:

    • slot:
      4-7 : The slot number that the interrupt signal to be cleared.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ClrSlotInt] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : CountDownTimerReadValue

CountDownTimerReadValue()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
CountDownTimerReadValue | * | * | * | * | * | *

  • Description:

    • Read the current value of CountDownTimer(count).
    when the return value is 0, that is the time is up.
  • Declaration:

    • int CountDownTimerReadValue(int channel,unsigned long *value);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
    • value:
      • a pointer for the value to be stored.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return current timer value.
  • Demo program:

    • demo91.c
[Index] [Back]
[MiniOS7 Library reference : CountDownTimerReadValue] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : CountDownTimerStart

CountDownTimerStart()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
CountDownTimerStart | * | * | * | * | * | *

  • Description:

    • Start to use CountDownTimer.
  • Declaration:

    • int CountDownTimerStart(int channel,unsigned long count);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
    • count:
      • the count(time) want to be countdown.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return NoError.
  • Demo program:

    • demo91.c
[Index] [Back]
[MiniOS7 Library reference : CountDownTimerStart] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : DataSizeInCom

DataSizeInCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
DataSizeInCom | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
DataSizeInCom0 |  |  | *1 |  |  |
DataSizeInCom1 | *2 | *1 | *1 | *1 | * | *
DataSizeInCom2 | *2 | *1 | *2 | *1 | * | *
DataSizeInCom3 | *1 | *3 | *2 | *2 | * | *
DataSizeInCom4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Get the data number on the input buffer of COM port.
  • Declaration:

    • int DataSizeInCom(int port);
    int DataSizeInCom0(void);
    int DataSizeInCom1(void);
    int DataSizeInCom2(void);
    int DataSizeInCom3(void);
    int DataSizeInCom4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    else return the data number in input buffer.(0 means there is no data in buffer.)
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : DataSizeInCom] Ver.1.3.1
Final update date:[03/21/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : DelayMs

DelayMs()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
DelayMs | * | * | * | * | * | *

  • Description:

    • Delay some time interval, the time unit is ms.
    (use DelayMsneed not call TimerOpen)
  • Declaration:

    • void DelayMs(unsigned t);
  • Input Parameter:

    • t:
      • the time want to delay.
  • Return Value:

    • None.
  • Demo program:

    • demo97.c
[Index] [Back]
[MiniOS7 Library reference : DelayMs] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : DI_16

 UDIO_ReadConfig_16()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
UDIO_ReadConfig_16 |  |  | * |  |  |

  • Description:

    • Read the setting value of I-8000 Universal Digital input/output module.
    Ў@
  • Declaration:

    • unsigned     UDIO_ReadConfig_16(int slot);
    Ў@
  • Input Parameter:

    • slot:
      4 slots: 0-3. 8 slots : 0-7.
  • Return Value:

    • The setting value of Universal Digital DIO module. Each bit for one channel. 1 denotes Input status, 0 denotes Output status.
  • Demo program:

    • None.
  • Remark:

    Before using UDIO_ReadConfig_16 , please update the 8000 library on 2003/11/03 or later

[Index] [Back]

[MiniOS7 Library reference : DO_16] Ver.1.3.1
Final update date:[11/10/2003], By: Tsai, Kun-Ting.
Any question please E-Mail to: ICPDAS_SERVICE


MiniOS7 Library reference : DI_16

DI_16()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
DI_8 |  |  | * |  |  |
DI_16 |  |  | * |  |  |
UDIO_DI16 | Ў@ | Ў@ | * | Ў@ | Ў@ | Ў@

  • Description:

    • Read the input value of I-8000 Digital input module.
    DI_8() for D/I less or equal 8 points.
    DI_16() for D/I 9 to 16 points.
  • UDIO_DI16 for the Universal Digital DIO module.
  • Declaration:

    • unsigned int DI_16(int slot);
    unsigned char DI_8(int slot);
  • unsigned char UDIO_DI16(int slot);
  • Input Parameter:

    • slot:
      4 slots: 0-3. 8 slots : 0-7.
  • Return Value:

    • The input value of D/I module. Each bit for one input. 1 for active, 0 for inactive.
  • Demo program:

    • None.
  • Remark:

    Before using UDIO_DI16 , please update the 8000 library on 2003/11/03 or later

[Index] [Back]

[MiniOS7 Library reference : DO_16] Ver.1.3.1
Final update date:[11/10/2003], By: Tsai, Kun-Ting.
Any question please E-Mail to: ICPDAS_SERVICE


MiniOS7 Library reference : Disable5DigitLed

Disable5DigitLed()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Disable5DigitLed | * | * | * | * | * | *

  • Description:

    • Disable the scan circuit for 5-Digit Led. All digit will be turn off.
  • Declaration:

    • void Disable5DigitLed(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : Disable5DigitLed] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : DisableWDT

DisableWDT()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
DisableWDT | * | * | * | * | * | *

  • Description:

    • After call DisableWDT, the system timer ISR will refresh WDT, so user's program need not to call RefreshWDT.
  • Declaration:

    • void DisableWDT(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • watchdog.c
[Index] [Back]
[MiniOS7 Library reference : DisableWDT] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : DO_16

 UDIO_WriteConfig_16()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
UDIO_WriteConfig_16 |  |  | * |  |  |

  • Description:

    • Read the setting value of I-8000 Universal Digital input/output module
  • Declaration:

    • void     UDIO_WriteConfig_16(int slot, unsigned int config);
  • Input Parameter:

    • slot:
      for 4 slots: 0-3, for 8 slots : 0-7.
    • config:
      Each bit for one channel. 1 denotes Input status, 0 denotes Output status.
  • Return Value:

    • None.
  • Demo program:

    • None.
  • Remark:

    Before using UDIO_WriteConfig_16 , please update the 8000 library on 2003/11/03 or later

[Index] [Back]
[MiniOS7 Library reference : DO_16] Ver.1.3.1
Final update date:[11/10/2003], By: Tsai, Kun-Ting.
Any question please E-Mail to: ICPDAS_SERVICE


MiniOS7 Library reference : DO_16

DO_16()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
DO_8 |  |  | * |  |  |
DO_16 |  |  | * |  |  |
DIO_DO_8 | Ў@ | Ў@ | * | Ў@ | Ў@ | Ў@
UDIO_DO16 |  |  | * |  |  |

  • Description:

    • Set the output value of I-8000 Digital output module.
    DO_16() for the D/O modules that have 9-16 output points.
    DO_8() for the D/O modules that have 1-8 output points.
    DIO_DO_8() for the DI8_DO8 modules.
  • UDIO_DO16 for the Universal Digital DIO module.
    These three function will call ShowLED8()/ShowLED16() , so need not call ShowLED8()/ShowLED16() again.
  • Declaration:

    • void DO_16(int slot, unsigned int cdata);
    void DO_8(int slot, unsigned char cdata);
    void DIO_DO_8(int slot, unsigned char cdata);
  • void UDIO_DO16(int slot, unsigned char cdata);
  • Input Parameter:

    • slot:
      for 4 slots: 0-3, for 8 slots : 0-7.
    • cdata:
      Each bit for one output point. 1 for Active, 0 for inactive.
      If the output is Open Collector, active means the transister is turn on. If the output is Relay, active means NO (Normal Open) pin connect to COM pin.
  • Return Value:

    • None.
  • Demo program:

    • None.
  • Remark:

    Before using UDIO_DO16() , please update the 8000 library on 2003/11/03 or later

[Index] [Back]
[MiniOS7 Library reference : DO_16] Ver.1.3.1
Final update date:[11/10/2003], By: Tsai, Kun-Ting.
Any question please E-Mail to: ICPDAS_SERVICE


MiniOS7 Library reference : EE_MultiRead

EE_MultiRead()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EE_MultiRead | * | * | * | * | * | *

  • Description:

    • Read multi-bytes data from EEPROM.(Can cross blocks.)
  • Declaration:

    • int EE_MultiRead(int StartBlock,int StartAddr,int no,char *databuf);
  • Input Parameter:

    • StartBock:
      • 0 to 7(total 8 blocks).
    • StartAddr:
      • 0 to 255(every block has 256 bytes).
    • no:
      • 1 to 2048.
    • databuf:
      • The address to store data.
  • Return Value:

    • On success return NoError(0).
    On fail return Error code.BlockError(-10) or AddrError(-9) or (-101 for read error).
    ( Refer to const.htm)
  • Demo program:

    • eeprom.c
[Index] [Back]
[MiniOS7 Library reference : EE_MultiRead] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : EE_MultiWrite

EE_MultiWrite()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EE_MultiWrite | * | * | * | * | * | *

  • Description:

    • Write data to EEPROM. Maximun can write 16 bytes, and must write on the same block.
  • Ў@
    • Another limitationЎC The low 4 bits of the address only can be changed when writing data to EEPROMЎAIt was
    • 0->1->2->3->4->5->6->7->8->9->0xA->0xB->0xC->0xD->0xE->0xF->0.
    • The high 4 bits of the address didn't be changed.

    For example:EE_MultiWrite(1,21,16,"ABCDEFGHIJKLMNOP");

    16 bytes data"A~P" write to EEPROM form address 21(0x15)ЎAThey should end to 36(0x24)ЎCAccording to this limitation,when data is writed to address 1F,it return to address 10,the data "L~P" will be writed from address10 to 14.

    • Suggest the starting of the address from 0x00,0x10,0x20~0xF0.

    Ў@

  • Declaration:

    • int EE_MultiWrite(int Block,int Addr,int no,char *Data);
  • Input Parameter:

    • Block:
      • 0 to 7(total 8 blocks).
    • Addr:
      • 0 to 255(every block has 256 bytes).
    • no:
      • 1 to 16.
    • Data:
      • The start address of buffer that the data is stored.
  • Return Value:

    • On success return NoError.
    On fail return Error code. BlockError(-10) or AddrError(-9) or WriteError(-11).
  • Demo program:

    • eeprom.c
[Index] [Back]
[MiniOS7 Library reference : EE_MultiWrite] Ver.1.3.1
Final update date:[09/24/2002], By: Tsai,Kun-Ting.


MiniOS7 Library reference : EE_RandomRead

EE_RandomRead()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EE_RandomRead | * | * | * | * | * | *

  • Description:

    • Read one byte data from EEPROM.
  • Declaration:

    • int EE_RandomRead(int Block,int Addr);
  • Input Parameter:

    • Block:
      • 0 to 7(total 8 blocks).
    • Addr:
      • 0 to 255(every block has 256 bytes).
  • Return Value:

    • On success return the value on EEPROM(0 to 255).
    On fail return Error code.BlockError(-10) or AddrError(-9) or (-101 for read error).
    ( Refer to const.htm)
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : EE_RandomRead] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : EE_RandomWrite

EE_RandomWrite()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EE_RandomWrite | * | * | * | * | * | *

  • Description:

    • Write one byte data to EEPROM.
  • Declaration:

    • int EE_RandomWrite(int Block, int Addr, int Data);
  • Input Parameter:

    • Block:
      • 0 to 7(total 8 blocks).
    • Addr:
      • 0 to 255(every block has 256 bytes).
    • Data:
      • 0 to 255(8-bits data).
  • Return Value:

    • On success return NoError.
    On fail return Error code. BlockError(-10) or AddrError(-9) or WriteError(-11).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : EE_RandomWrite] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : EE_WriteEnable

EE_WriteEnable()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EE_WriteEnable | * | * | * | * | * | *

  • Description:

    • Set EEPROM to write-enable mode.
  • Declaration:

    • void EE_WriteEnable(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • eeprom.c
[Index] [Back]
[MiniOS7 Library reference : EE_WriteEnable] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : EE_WriteProtect

EE_WriteProtect()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EE_WriteProtect | * | * | * | * | * | *

  • Description:

    • Set EEPROM to write-protected mode.
  • Declaration:

    • void EE_WriteProtect(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • eeprom.c
[Index] [Back]
[MiniOS7 Library reference : EE_WriteProtect] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Enable5DigitLed

Enable5DigitLed()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Enable5DigitLed | * | * | * | * | * | *

  • Description:

    • Enable the scan circuit for 5-Digit Led. The showed digits will appear again.
  • Declaration:

    • void Enable5DigitLed(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : Enable5DigitLed] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : EnableEEP

EnableEEP()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EnableEEP | * | * | * | * | * | *

  • Description:

    • Set EEPROM to write-enable mode.
  • Declaration:

    • void EnableEEP(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • demo6.c
[Index] [Back]
[MiniOS7 Library reference : EnableEEP] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : EnableWDT

EnableWDT()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EnableWDT | * | * | * | * | * | *

  • Description:

    • The WatchDog Timer(WDT) of 7188x is always enable, and the system Timer ISR will refresh it.
    When user's program call EnableWDT(), the system timer ISR will stop to refresh WDT, and user's program must do it by call RefreshWDT(). Otherwise, the system will be reset by WDT. The timeout period of WDT is 1.6 seconds.
    7188x do not use the WDT inside the CPU, so there is no function to detect if the system is reset by WDT.
  • Declaration:

    • void EnableWDT(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • watchdog.c
[Index] [Back]
[MiniOS7 Library reference : EnableWDT] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : FlashErase

FlashErase()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
FlashErase | * | * | * | * | * | *

  • Description:

    • Erase one sector(64K bytes) of Flash Memory, all data on that sector will become 0xFF.
  • Declaration:

    • int FlashErase(unsigned seg);
  • Input Parameter:

    • seg:

      • (1)for 256K type,seg can be 0xC000, 0xD000, 0xE000.
      (2)for 512K type,seg can be 0x8000, 0x9000, 0xA000, 0xB000, 0xC000, 0xD000, 0xE000.
      (3)the segment 0xF000 is used for MiniOs7, if seg=0xF000 FlashErase will do nothing.
  • Return Value:

    • On success return NoError(0).
    On fail return TimeOut(-5).
  • Demo program:

    • demo\demo9\demo9.c , demo\flash\flash.c
[Index] [Back]
[MiniOS7 Library reference : FlashErase] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : FlashRead

FlashRead()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
FlashRead | * | * | * | * | * | *

  • Description:

    • Read Flash memory .
    User can also use a far pointer to access the data on Flash memory directly. The code are:

    char far *ByteData,databyte;
    int far *IntData,dataint;
    long far *LongData,datalong;

    ByteData=(char far *)MK_FP(segment, offset);
    databyte=*ByteData;
    IntData=(int far *)MK_FP(segment, offset);
    dataint=*IntData;
    LongData=(long far *)MK_FP(segment, offset);
    datalong=*LongData;

  • Declaration:

    • int FlashRead(unsigned int seg, unsigned int offset);
  • Input Parameter:
    • seg:

      • 0-65535(0xffff).
    • offset:
      • 0 to 65535(0xffff).
  • Return Value:

    • FlashRead just return the value on address seg:offset.
    The address can be on SRAM,FLASH memory or other address(generally return 0xff).
  • Demo program:

    • demo\demo9\demo9.c , demo\flash\flash.c
[Index] [Back]
[MiniOS7 Library reference : FlashRead] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : FlashReadId

FlashReadId()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
FlashReadId | * | * | * | * | * | *

  • Description:

    • Read Flash memory device code(high byte) and manufacture code(low byte).
  • Declaration:

    • int FlashReadId(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 256K type --> 0xB0C2 (MXIC 29f002NT),0xB001(AMD 29F002T)
    512K type --> 0xA4C2 (MXIC 29f040), 0xA401 (AMD 29f040)
  • Demo program:

    • demo\demo9\demo9.c , demo\flash\flash.c
[Index] [Back]
[MiniOS7 Library reference : FlashReadId] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : FlashWrite

FlashWrite()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
FlashWrite | * | * | * | * | * | *

  • Description:

    • Write one byte data to Flash memory.
    When write data to Flash Memory, data bit only can be changed from 1 to 0.
    So if data in that position is 0xff ,you can write any data to it.
    But if data in that position is 0x01,you can only write 0x00 to it.
    FlashWrite do not check it,and just write it.When you want change data from 0 to 1,you will get TimeoutError. After call FlashErase you can write any data to it again.
  • Declaration:

    • int FlashWrite(unsigned int seg, unsigned int offset, char data);
  • Input Parameter:
    • seg:

      • (1)for 256K type,seg can be 0xC000, 0xD000, 0xE000.
      (2)for 512K type,seg can be 0x8000, 0x9000, 0xA000, 0xB000, 0xC000, 0xD000, 0xE000.
      (3)the segment 0xF000 is used for MiniOs7, if seg=0xF000 FlashErase will do nothing.
    • offset:
      • 0 to 65535(0xffff).
    • data:
      • 0 to 255(8-bit data).
  • Return Value:

    • On success return NoError(0).
    On fail return TimeOut(-5) or SegmentError(-12).
  • Demo program:

    • demo\demo9\demo9.c , demo\flash\flash.c
[Index] [Back]
[MiniOS7 Library reference : FlashWrite] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Getch

Getch()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Getch | * | * | * | * | * | *

  • Description:

    • Read one character from COM1. If there is not any input in data buffer, the function will wait until COM1 receive any data.
  • Declaration:

    • int Getch(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 0 to 255.
  • Demo program:

    • echo485.c
[Index] [Back]
[MiniOS7 Library reference : Getch] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetCtsStatus

GetCtsStatus()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetCtsStatus1 | *2 | *1 |  |  |  |
GetCtsStatus3 |  | *3 | *2 | *2 | * | *
GetCtsStatus4 |  |  | *2 |  |  |
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Get the status of COM1's CTS pin.
  • Declaration:

    • int GetCtsStatus1(void);
    int GetCtsStatus3(void);
    int GetCtsStatus4(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 0 for CTS is not active(high).
    1 for CTS is active(low).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : GetCtsStatus] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetDate

GetDate()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetTime | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Read the system date from the RTC of 7188x.
  • Declaration:

    • void GetDate(int *year,int *month,int *day);
  • Input Parameter:

    • year:
      • (2000-2080).
    • month:
      • (1-12).
    • day:
      • (1-31).
  • Return Value:

    • None.
  • Demo program:

    • datetime\dt.c
[Index] [Back]
[MiniOS7 Library reference : GetDate] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetFileInfoByName

GetFileInfoByName()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetFileInfoByName | * | * | * | * | * | *

  • Description:

    • Use file name to get file information.
  • Declaration:

    • char far *GetFileInfoByName(char *fname);
  • Input Parameter:

    • fname:
      • filename.
  • Return Value:

    • On success return the start address of the file information.
    On fail return NULL.
  • Demo program:

    • demo\file\file.c
[Index] [Back]
[MiniOS7 Library reference : GetFileInfoByName] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetFileInfoByNo

GetFileInfoByNo()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetFileInfoByNo | * | * | * | * | * | *

  • Description:

    • Use file index to get file information.
  • Declaration:

    • FILE_DATA far *GetFileInfoByNo(int no);
  • Input Parameter:

    • no:
      • The file index(The first file is index 0).
  • Return Value:

    • On success return the start address of the file information.
    On fail return NULL.
  • Demo program:

    • demo\file\file.c
[Index] [Back]
[MiniOS7 Library reference : GetFileInfoByNo] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetFileName

GetFileName()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetFileName | * | * | * | * | * | *

  • Description:

    • Use file index to get file name.
  • Declaration:

    • int GetFileName(int no,char *fname);
  • Input Parameter:

    • no:
      • The file index(The first file is index 0).
    • fname:
      • Buffer to store file name.
  • Return Value:

    • On success return NoError, and store the filename to fname.
    On fail return -1, and do not save any data to fname.
  • Demo program:

    • demo\file\file.c
[Index] [Back]
[MiniOS7 Library reference : GetFileName] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetFileNo

GetFileNo()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetFileNo | * | * | * | * | * | *

  • Description:

    • Get total number of file stored in Flash Memory.
  • Declaration:

    • int GetFileNo(void);
  • Input Parameter:

    • None.
  • Return Value:

    • The file number.
  • Demo program:

    • demo\file\file.c
[Index] [Back]
[MiniOS7 Library reference : GetFileNo] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetFilePositionByName

GetFilePositionByName()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetFilePositionByName | * | * | * | * | * | *

  • Description:

    • Use file name to get file start position on Flash Memory.
  • Declaration:

    • FILE_DATA far *GetFilePositionByName(char *fname);
  • Input Parameter:

    • fname:
      • filename.
  • Return Value:

    • On success return the start address of the file.
    On fail return NULL.
  • Demo program:

    • demo\file\file.c
[Index] [Back]
[MiniOS7 Library reference : GetFilePositionByName] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetFilePositionByNo

GetFilePositionByNo()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetFilePositionByNo | * | * | * | * | * | *

  • Description:

    • Use file index to get the start position of file on Flash Memory. User can use the address to get file data.
    (If file size > 64K-16, must use a huge pointer(char huge *) to get file data for offset >64K-16)
  • Declaration:

    • char far *GetFilePositionByNo(int no);
  • Input Parameter:

    • no:
      • The file index(The first file is index 0).
  • Return Value:

    • On success return the start address of the file.
    On fail return NULL.
  • Demo program:

    • demo\file\file.c
[Index] [Back]
[MiniOS7 Library reference : GetFilePositionByNo] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetLibVersion

GetLibVersion()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetLibVersion | * | * | * | * | * | *

  • Description:

    • Get the library version of MiniOS7 library.
  • Declaration:

    • unsigned GetLibVersion(void);
  • Input Parameter:

    • None.
  • Return Value:

    • High byte is major version number, Low byte is the minor version number.
    For example: Ver. 1.15 will return 0x010F.
  • Demo program:

    • hello1.c
[Index] [Back]
[MiniOS7 Library reference : GetLibVersion] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetNetId

GetNetId()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetNetId |  |  | * |  |  |

  • Description:
    The switch 1 of 8000 series is used to set ID of the module, user's program can use GetNetId() to read the set value.
  • Declaration:
    int GetNetId(void);
  • Input Parameter:
    None.
  • Return Value:
    0-255ЎC
  • Demo program:
    None.
[Index] [Back]
[MiniOS7 Library reference : GetNetId] Ver.1.3.1
Final update date:[03/26/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetNumberOfSlot

GetNumberOfSlot()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetNumberOfSlot |  |  | * |  |  |

  • Description:

    • Use to check the system is 84xx or 88xx. In I-8000 series I-84xx with 4 slot, I-88xx with 8 slots. GetNumberOfSlot() will return 4 for I-84xx and return 8 for I-88xx.
  • Declaration:

    • int GetNumberOfSlot(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 4 for I-84xx, 8 for I-88xx.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : GetNumberOfSlot] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetPio

GetPio()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetDio4 |  | * |  | * | * | *
GetDio9 |  | * |  | * | * | *
GetDio14 |  | * |  | * | * | *
GetDI2 |  | * |  | * | * | *
GetDI3 |  | * |  | * | * | *
GetDO1 |  | * |  | * | * | *
GetDO2 |  | * |  | * | * | *
GetDO3 |  | * |  | * | * | *
GetTi0 |  | * | * | * | * | *
GetTo0 |  | * | * | * | * | *
GetTi1 |  | * | * | * | * | *
GetTo1 |  | * | * | * | * | *

  • Description:

    • When the DIO pin is set to output mode, call these functions can current output status.
    When the DIO pin is set to input mode, call these functions can current input status.
  • Declaration:

    • int GetDio9(void);
    int GetDio4(void);
    int GetDio14(void);
    int GetDI2(void);
    int GetDI3(void);
    int GetDO1(void);
    int GetDO2(void);
    int GetDO3(void);
    int GetTi0(void);
    int GetTo0(void);
    int GetTi1(void);
    int GetTo1(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 0 for low, others (Not equal to 0)for high.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : GetPio] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetSlotInt

GetSlotInt()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetSlotInt |  |  | * |  |  |

  • Description:

    • On I-88xx series there is 8 slots. The last 4 slot share the same interrupt signal, must call GetSlotInt() to check which slot gererate the interrupt signal.
  • Declaration:

    • int GetSlotInt(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 4-7 : The slot that generate the interrupt signal.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : GetSlotInt] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetSystemKey

GetSystemKey()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetSytemKey |  |  | * |  |  |

  • Description:

    • On I-8000series, system support 4 keys, SET, MODE, UP, and DOWN.
    GetSystemKey() will read one key input value from system key input buffer. If there is no system key input, the function will wait until any system key input..
  • Declaration:

    • int GetSystemKey(void);
  • Input Parameter:

    • None.
  • Return Value:

    • SKEY_SET(1) for SET key,
    SKEY_MODE(2) for MODE key,
    SKEY_UP(3) for UP key,
    SKEY_DOWN(4) for DOWN key.
  • Demo program:

    • demo\syskey\syskey.c
[Index] [Back]
[MiniOS7 Library reference : GetSystemKey] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetTime

GetTime()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetTime | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Read the system time from the RTC of 7188x.
  • Declaration:

    • void GetTime(int *hour,int *minute,int *sec);
  • Input Parameter:

    • hour:
      • The address to save hour(0-23).
    • minute:
      • The address to save minute(0-59).
    • sec:
      • The address to save second(0-59).
  • Return Value:

    • None.
  • Demo program:

    • datetime\dt.c
[Index] [Back]
[MiniOS7 Library reference : GetTime] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : GetWeekDay

GetWeekDay()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
GetWeekDay | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Read the weekday from the RTC. GetWeekDay() does not check the weekday is right or not, just read from RTC.
    When use MiniOS7 command "date" to set date, MiniOS7 will calculate the right weekday and set to RTC. If user call SetDate(), it also will calculate the right weekday and set to RTC. But if user call SetWeekDay( ) need to calculate the right weekday himself.
  • Declaration:

    • int GetWeekDay(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 0:Sunday, 1-6:Monday to Saturday.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : GetWeekDay] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Init5DigitLed

Init5DigitLed()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Init5DigitLed | * | * | * | * | * | *

  • Description:

    • Initial 5-Digit Led, All segment will be turn OFF.
  • Declaration:

    • void Init5DigitLed(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • demo96.c
[Index] [Back]
[MiniOS7 Library reference : Init5DigitLed] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : InstallCom

InstallCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
InstallCom | *1,*2 |  | *1,*2 | *1,*2 | * | *
InstallCom[*] |  | *1 |  |  |  |
InstallCom0 |  |  | *1 |  |  |
InstallCom1 | *2 | *1 | *1 | *1 | * | *
InstallCom2 | *2 | *1 |  | *1 | * | *
InstallCom2[*] |  |  | *2 |  |  |
InstallCom3 | *1 | *3 | *2 | *2 | * | *
InstallCom4 | *1 | *3 | *2 | *2 | * | *
_InstallCom |  | *1,*3 |  |  |  |
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502
  • Description:

    • Install the driver of COM port for COM0 to COM4 in interrupt vector.It means that all COM ports used the interrupt to read and write data.(Input buffer:1024 bytes,Output buffer:512 bytes)
    The Parity can be set to None(0)/Even(1)/Odd(2)/Mark(3)/Space(4), but cannot set to MARK(3)(always 1) or SPACE(4)(always 0) in using CPU internal UART .
    Data bit can be set to 5,6,7 or 8,but cannot be 5 or 6 in using CPU internal UART .
    When use CPU internal UART, the Stop bit always is 1 bit, so need not to set it.
  • Declaration:

    • int InstallCom[*](int port, unsigned long baud, int data, int parity);
    int InstallCom(int port, unsigned long baud, int data, int parity,int stop);
    int InstallCom0(unsigned long baud, int data, int parity);
    int InstallCom1(unsigned long baud, int data, int parity);
    int InstallCom2(unsigned long baud, int data, int parity);
    int InstallCom2[*](unsigned long baud, int data, int parity, int stop);
    int _InstallCom(int port, unsigned long baud, int data, int parity, int stop);
    int InstallCom3(unsigned long baud, int data, int parity, int stop);
    int InstallCom4(unsigned long baud, int data, int parity, int stop);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • baud:
      • Can be 2 to 115200(some can set 15 to 921600).
    • data:
      • can be 5 or 6 or 7 or 8.
    • parity:
      • can be 0(None) or 1(Even) or 2(Odd) 3(MARK, always 1) or 4(SPACE,always 0).
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    If data is not (5 or 6 or) 7 or 8 return DataError(-2).
    If parity is not 0 or 1 or 2 (or 3 or 4)return ParityError(-3).
    If stop is not 1 or 2 return StopError(-4).
    else return NoError(0).
  • Demo program:

    • echo485.c
[Index] [Back]
[MiniOS7 Library reference : InstallCom] Ver.1.3.1
Final update date:[03/21/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : InstallUserTimer

InstallUserTimer()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
InstallUserTimer | * | * | * | * | * | *

  • Description:

    • Install user's timer function. User's timer function will be called every 1 ms.
  • Declaration:

    • void InstallUserTimer(void (*fun)(void));
  • Input Parameter:

    • fun:
      • The user's function pointer. The function cannot use input agument, and can not return value.
  • Return Value:

    • None.
  • Demo program:

    • demo96.c , demo98.c
[Index] [Back]
[MiniOS7 Library reference : InstallUserTimer] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : InstallUserTimer1C

InstallUserTimer1C()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
InstallUserTimer1C | * | * | * | * | * | *

  • Description:

    • Install user's timer function on interrupt 0x1c.
    System timer will call int 0x1c every 55 ms.
  • Declaration:

    • void InstallUserTimer1C(void (*fun)(void));
  • Input Parameter:

    • fun:
      • The user's function pointer. The function cannot use input agument, and can not return value.
  • Return Value:

    • None.
  • Demo program:

    • demo96.c
[Index] [Back]
[MiniOS7 Library reference : InstallUserTimer1C] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Is7188x

Is7188x()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Is7188 | * |  |  |  |  |
Is7188x |  | * |  |  |  |
Is8000 |  |  | * |  |  |
Is7188xa |  |  |  | * |  |
Is7188xb |  |  |  |  | * |
Is7188e |  |  |  |  |  | *

  • Description:

    • Use to check if the program is run under MiniOs7(7188x or 8000).
  • Declaration:

    • int Is7188x(void);
    int Is8000(void);
    int Is8000(void);
    int Is7188xa(void);
    int Is7188xb(void);
    int Is7188e(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 0:Not run on MiniOs7(7188x/8000).
    When the program is for module 'A', but download to module 'B' and run, "Isxxxx()" also return 0.
    256:run on MiniOs7 and the flash size is 256K.
    512:run on MiniOs7 and the flash size is 512K.
  • Demo program:

    • hello1.c
[Index] [Back]
[MiniOS7 Library reference : Is7188x] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : IsCom

IsCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
IsCom | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
IsCom0 |  |  | *1 |  |  |
IsCom1 | *2 | *1 | *1 | *1 | * | *
IsCom2 | *2 | *1 | *2 | *1 | * | *
IsCom3 | *1 | *3 | *2 | *2 | * | *
IsCom4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Check is there any data in the input buffer of COM port.
  • Declaration:

    • int IsCom(int port);
    int IsCom0(void);
    int IsCom1(void);
    int IsCom2(void);
    int IsCom3(void);
    int IsCom4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    QueueIsEmpty(0): there is no data on the input buffer of COM port.
    others: there is at least one data in the input buffer of COM port.
    QueueIsNotEmpty(1) or QueueOverflow(-7). When the return value is QueueOverflow(-7) must call ReadCom() to reset the overflow status.
  • Demo program:

    • echo485.c
[Index] [Back]
[MiniOS7 Library reference : IsCom] Ver.1.3.1
Final update date:[03/21/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : IsDetectBreak

IsDetectBreak()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
IsDetectBreak | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
IsDetectBreak0 |  |  | *1 |  |  |
IsDetectBreak1 | *2 | *1 | *1 | *1 | * | *
IsDetectBreak2 | *2 | *1 | *2 | *1 | * | *
IsDetectBreak3 | *1 | *3 | *2 | *2 | * | *
IsDetectBreak4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Check if COM port receive a BREAK signal.
  • Declaration:

    • int IsDetectBreak(int port);
    int IsDetectBreak0(void);
    int IsDetectBreak1(void);
    int IsDetectBreak2(void);
    int IsDetectBreak3(void);
    int IsDetectBreak4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    0 : Not detected.
    1 : the break signal is detected.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : IsDetectBreak] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : IsSytemKey

IsSytemKey()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
IsSytemKey |  |  | * |  |  |

  • Description:

    • Check if any system key input on the system key input buffer.
  • Declaration:

    • int IsSytemKey(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 0 for without any system key input.
    Others for has system key input in the buffer.
  • Demo program:

    • demo\syskey\syskey.c
[Index] [Back]
[MiniOS7 Library reference : IsSytemKey] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : IsTxBufEmpty

IsTxBufEmpty()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
IsTxBufEmpty | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
IsTxBufEmpty0 |  |  | *1 |  |  |
IsTxBufEmpty1 | *2 | *1 | *1 | *1 | * | *
IsTxBufEmpty2 | *2 | *1 | *2 | *1 | * | *
IsTxBufEmpty3 | *1 | *3 | *2 | *2 | * | *
IsTxBufEmpty4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Check if the output buffer of COM port is empty (All data was send out).
  • Declaration:

    • int IsTxBufEmpty(int port);
    int IsTxBufEmpty0(void);
    int IsTxBufEmpty1(void);
    int IsTxBufEmpty2(void);
    int IsTxBufEmpty3(void);
    int IsTxBufEmpty4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    0 : not empty.
    1 : empty.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : IsTxBufEmpty] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Kbhit

Kbhit()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Kbhit | * | * | * | * | * | *

  • Description:

    • Kbhit checks to see if any data is currently available in the input buffer of COM1.
  • Declaration:

    • int Kbhit(void);
  • Input Parameter:

    • None.
  • Return Value:

    • 0 : for no data input.
    Others : Has data in input buffer, and the return value is the next data in buffer, if the next data is '\0' it will return -1(0xFFFF).
  • Demo program:

    • echo485.c
[Index] [Back]
[MiniOS7 Library reference : Kbhit] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : LedOff

LedOff()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
LedOff | * | * | * | * | * | *

  • Description:

    • Turn off the red LED.
  • Declaration:

    • void LedOff(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • demo96.c
[Index] [Back]
[MiniOS7 Library reference : LedOff] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : LedOn

LedOn()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
LedOn | * | * | * | * | * | *

  • Description:

    • Turn on the red LED.
  • Declaration:

    • void LedOn(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • demo96.c
[Index] [Back]
[MiniOS7 Library reference : LedOn] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : LedToggle

LedToggle()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
LedToggle | * | * | * | * | * | *

  • Description:

    • Toggle the status of the red LED.
  • Declaration:

    • void LedToggle(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : LedToggle] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : LineInput

LineInput()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
LineInput | * | * | * | * | * | *

  • Description:

    • input one line from StdInput.
  • Declaration:

    • int LineInput(char *buf,int maxlen);
  • Input Parameter:
    • buf:
      • The buffer to store the input data.
    • maxlen:
      • (size of the buffer)-1.
  • Return Value:

    • The input character number.
  • Demo program:

    • scanf.c
[Index] [Back]
[MiniOS7 Library reference : LineInput] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : NameOfModule

MiniOS7 Library reference©ъ
NameOfModule
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
NameOfModule |  |  | * |  |  |
ModuleType |  |  | * |  |  |

  • Description:

    • After system power on or reset, MiniOS7 will look for all add-on modules of I-8000 series. And store all data on bios area.
    NameOfModule[0..7] will save the module name. For example, if the module is 8051 the saved value is 51, if the module is 8142 then save 142. That is 8nnn or 87nnn the saved value is nnn. If nnn=255 means taht slot without any module.
    ModuleType[0..7] save the type of module. If bit 7 = 1 means that module parallel module(8nnn), else that module is 87nnn.
    The code for use ModuleType and NameOfModule to decide the module on the slot of I-8000 are as follows:

    for(i=0;i < NumberOfSlot;i++){
       if(ModuleType[i]& 0x80){
      Print("Slot %d = 8%03u\n\r",i,NameOfModule[i]);
       }
       else if(NameOfModule[i]!=0xFF) Print("Slot %d = 870%02d\n\r",i,NameOfModule[i]);
       else Print("Slot %d without any module.\n\r",i);
    }
  • Declaration:

    • extern unsigned char far const *ModuleType;
    extern unsigned char far const *NameOfModule;
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : NameOfModule] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Print

Print()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Print | * | * | * | * | * | *

  • Description:

    • This function is used to instead of printf, and the only difference between Print and printf is Print do not transfer '\n' to '\n'+'\r'. That is '\n' only send out the code 0x0A, not 0x0A+0x0D. The printed message is send out to COM1.(default use 115200,N,8,1)
  • Declaration:

    • int Print(char *fmt,...);
  • Input Parameter:

    • Please refer to C's standard function printf.
  • Return Value:

    • The character number to be send out.
  • Demo program:

    • hello.c
[Index] [Back]
[MiniOS7 Library reference : Print] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : printCom

printCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
printCom | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
printCom0 |  |  | *1 |  |  |
printCom1 | *2 | *1 | *1 | *1 | * | *
printCom2 | *2 | *1 | *2 | *1 | * | *
printCom3 | *1 | *3 | *2 | *2 | * | *
printoCom4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Let user output from COM port just like use printf.
  • Declaration:

    • int printCom(int port,char *fmt,...);
    int printCom0(char *fmt,...);
    int printCom1(char *fmt,...);
    int printCom2(char *fmt,...);
    int printCom3(char *fmt,...);
    int printCom4(char *fmt,...);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • fmt:
      • Please refer to C's library printf.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    On success return the number of bytes send out to COM port.
    On fail return Error code.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : printCom] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ProtectEEP

ProtectEEP()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ProtectEEP | * | * | * | * | * | *

  • Description:

    • Set EEPROM to write-protected mode.
  • Declaration:

    • void ProtectEEP(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • demo6.c
[Index] [Back]
[MiniOS7 Library reference : ProtectEEP] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Putch

Putch()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Putch | * | * | * | * | * | *

  • Description:

    • Send one character to COM1.(only the low byte will be send out.)
  • Declaration:

    • void Putch(int data);
  • Input Parameter:

    • data:
      • 0 to 255. If data > 255, only the low byte will be send out.
  • Return Value:

    • None.
  • Demo program:

    • echo485.c
[Index] [Back]
[MiniOS7 Library reference : Putch] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Puts

Puts()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Puts | * | * | * | * | * | *

  • Description:

    • Send a string to COM1.(Puts will call Putch to send the string.)
  • Declaration:

    • void Puts(char *str);
  • Input Parameter:

    • str:
      • The pointer to the string to be send.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : Puts] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ReadCom

ReadCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ReadCom | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
ReadCom0 |  |  | *1 |  |  |
ReadCom1 | *2 | *1 | *1 | *1 | * | *
ReadCom2 | *2 | *1 | *2 | *1 | * | *
ReadCom3 | *1 | *3 | *2 | *2 | * | *
ReadCom4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Read one byte data from input buffer of COM port.
  • Declaration:

    • int ReadCom(int port);
    int ReadCom0(void);
    int ReadCom1(void);
    int ReadCom2(void);
    int ReadCom3(void);
    int ReadCom4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    On success return 0-255.
    On fail return Error code QueueEmpty(-6) or PortError(-1).
  • Demo program:

    • echo485.c
[Index] [Back]
[MiniOS7 Library reference : ReadCom] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ReadEEP

ReadEEP()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
WriteEEP | * | * | * | * | * | *

  • Description:

    • Read one byte data from EEPROM.
  • Declaration:

    • int ReadEEP(int block, int addr);
  • Input Parameter:

    • block:
      • 0 to 7(total 8 blocks).
    • addr:
      • 0 to 255(every block has 256 bytes).
  • Return Value:

    • On success return the value on EEPROM(0 to 255).
    On fail return Error code.BlockError(-10) or AddrError(-9) or (-101,-102 for read error).
    ( Refer to const.htm)
  • Demo program:

    • demo6.c
[Index] [Back]
[MiniOS7 Library reference : ReadEEP] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ReadInitPin

ReadInitPin()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ReadInitPin | * | * | * | * | * | *

  • Description:

    • Read the status of INIT* pin.
  • Declaration:

    • int ReadInitPin(void);
  • Input Parameter:

    • None.
  • Return Value:

    • InitPinIsOpen(0):Init* pion is floatting or connect to VCC.
    InitPinIsNotopen(1):Init* pin is connect to GND.
  • Demo program:

    • 7521.c
[Index] [Back]
[MiniOS7 Library reference : ReadInitPin] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ReadNVRAM

ReadNVRAM()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ReadNVRAM | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Read data from NVRAM.
  • Declaration:

    • int ReadNVRAM(int addr);
  • Input Parameter:

    • addr:
      • 0 to 30,total 31 bytes.
  • Return Value:

    • On success return data(0-255) stored on that address.
    On fail return AddrError(-9).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ReadNVRAM] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ReceiveResponseFrom7000

ReceiveResponseFrom7000()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ReceiveResponseFrom7000 | * | * | * | * | * | *

  • Description:

    • After call SendCmdTo7000 user can call ReceiveResponseFrom7000 to get the response from 7000.
  • Declaration:

    • int ReceiveResponseFrom7000(int iPort, unsigned char *cCmd, long lTimeout, int iChksum);
  • Input Parameter:

    • iPort:
      • 1 for COM1, 2 for COM2.
    • cCmd:
      • Response received from 7000.
      If checksum is enable, the function will check and remove the checksum.
      The CR is removed.
    • lTimeout:
      • Set the timeout, unit is check comport times.
    • iChecksum:
      • 1 for enable checksum, 0 for disable checksum.
  • Return Value:

    • On success return NoError.
    On fail return Error code(refer to const.htm).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ReceiveResponseFrom7000] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : RefreshWDT

RefreshWDT()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
RefreshWDT | * | * | * | * | * | *

  • Description:

    • After call EnableWDT(), the system Timer ISR will not refresh WDT again, so user's program must call RefreshWDT() to refresh WDT.
  • Declaration:

    • void RefreshWDT(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • watchdog.c
[Index] [Back]
[MiniOS7 Library reference : RefreshWDT] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ResetScanBuffer

ResetScanBuffer()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ResetScanBuffer | * | * | * | * | * | *

  • Description:

    • Set Scanf to use default input buffer(maxlen=80).
  • Declaration:

    • void ResetScanBuffer(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • scanf.c
[Index] [Back]
[MiniOS7 Library reference : ResetScanBuffer] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : RestoreCom

RestoreCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
RestoreCom | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
RestoreCom0 |  |  | *1 |  |  |
RestoreCom1 | *2 | *1 | *1 | *1 | * | *
RestoreCom2 | *2 | *1 | *2 | *1 | * | *
RestoreCom3 | *1 | *3 | *2 | *2 | * | *
RestoreCom4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • If the program call InstallCom, then before exit the program must call RestoreCom to restore the setting of COM PORT.
  • Declaration:

    • int RestoreCom(int port);
    int RestoreCom0(void);
    int RestoreCom1(void);
    int RestoreCom2(void);
    int RestoreCom3(void);
    int RestoreCom4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    else return NoError(0).
  • Demo program:

    • echo485.c
[Index] [Back]
[MiniOS7 Library reference : RestoreCom] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Scanf

Scanf()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Scanf | * | * | * | * | * | *

  • Description:

    • like C's scanf. ( cannot used on MSC/VC++)
  • Declaration:

    • int Scanf(char *fmt, ...);
  • Input Parameter:

    • Please refer to C's library reference.
  • Return Value:

    • On success, return the number of input fields successfully scanned, converted, and stored.
    The return value does not include scanned fields that were not stored.
    Return value = 0 if no fields were stored.
    Return value = EOF if attempts to read at end-of-string.
  • Demo program:

    • scanf.c
[Index] [Back]
[MiniOS7 Library reference : Scanf] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SendBreak

SendBreak()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SendBreak | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
SendBreak0 |  |  | *1 |  |  |
SendBreak1 | *2 | *1 | *1 | *1 | * | *
SendBreak2 | *2 | *1 | *2 | *1 | * | *
SendBreak3 | *1 | *3 | *2 | *2 | * | *
SendBreak4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Send a BREAK signal to COM port.
  • Declaration:

    • int SendBreak(int port,unsigned timems);
    void SendBreak0(unsigned timems);
    void SendBreak1(unsigned timems);
    void SendBreak2(unsigned timems);
    void SendBreak3(unsigned timems);
    void SendBreak4(unsigned timems);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • timems:
      • The time period for send the break signal.(time unit is ms)
  • Return Value:

    • On success return NoError.
    If prot is not 0/1/2/3/4 return PortError(-1).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SendBreak] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SendCmdTo7000

SendCmdTo7000()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SendCmdTo7000 | * | * | * | * | * | *

  • Description:

    • Send command to 7000 series. If checksum is enable, the function will add 2 bytes checksum on the end of command.
  • Declaration:

    • int SendCmdTo7000(int iPort, unsigned char *cCmd, int iChksum);
  • Input Parameter:

    • iPort:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • cCmd:
      • Command to be send out(need not CR).
    • iChecksum:
      • 1 for enable checksum, 0 for disable checksum.
  • Return Value:

    • On success return NoError.
    On fail return Error code(refer to const.htm).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SendCmdTo7000] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Set5DigitLedIntensity

Set5DigitLedIntensity()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Set5DigitLedIntensity | * | * | * | * | * | *

  • Description:

    • Set the scan intensity of LED segments, the default value=7(For I-8000 the default value is 3.).
    If user feel that intensity is too dark, can set to higher value. (higher value will use more power.)
  • Declaration:

    • void Set5DigitLedIntensity(int intensity);
  • Input Parameter:
    • intensity:
      • 0 to 15.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : Set5DigitLedIntensity] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Set5DigitLedTestMode

Set5DigitLedTestMode()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Set5DigitLedTestMode | * | * | * | * | * | *

  • Description:

    • Set 5-DigitLed on Normal MODE or Test MODE.
  • Declaration:

    • void Set5DigitLedTestMode(int mode);
  • Input Parameter:
    • mode:
      • 0 for normal mode.
      1 for the test mode. On test mode all segment will turn on, and use the largest intensity.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : Set5DigitLedTestMode] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetA9

SetA9()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetA9 |  |  | * |  |  |
SetA12 |  |  | * |  |  |
SetB1A5 |  |  | * |  |  |
SetB1A6 |  |  | * |  |  |

  • Description:
    Set the special address signals on backplane/bus of 8000. (A9/A12/B1A5/B1A6)
    Please refer to the hardware manual of 8000 series for use these signals.
  • Declaration:
    void SetA9(int mode);
    void SetA12(int mode);
    void SetB1A5(int mode);
    void SetB1A6(int mode);
  • Input Parameter:
    • mode:
      0 : output low (0).
      1 : output high (1).
  • Return Value:
    None.
  • Demo program:
    None.
[Index] [Back]
[MiniOS7 Library reference : SetA9] Ver.1.3.1
Final update date:[03/26/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetBaudrate

SetBaudrate()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetBaudrate | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
SetBaudrate0 |  |  | *1 |  |  |
SetBaudrate1 | *2 | *1 | *1 | *1 | * | *
SetBaudrate2 | *2 | *1 | *2 | *1 | * | *
SetBaudrate3 | *1 | *3 | *2 | *2 | * | *
SetBaudrate4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Set the baudrate of COM port.
  • Declaration:

    • int SetBaudrate(int port,unsigned long baud);
    int SetBaudrate0(unsigned long baud);
    int SetBaudrate1(unsigned long baud);
    int SetBaudrate2(unsigned long baud);
    int SetBaudrate3(unsigned long baud);
    int SetBaudrate4(unsigned long baud);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • baud:
      • The new baud, can be 2 to 115200. (Some ports's baud rate can be set up to 921600, please refer to the hardware manual. The buadrate can be used must work with the clock of 16c550 and the driver IC of RS-232/485. In general use 300 to 115200.)
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    On success return NoError.
    On fail return Error code BaudRateError(-13).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetBaudrate] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetDate

MiniOS7 Library reference :
SetDate()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetTime | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Set the system date to the RTC of 7188x.
  • Declaration:

    • int SetDate(int year,int month,int day);
  • Input Parameter:

    • year:
      • (2000-2080).
    • month:
      • (1-12).
    • day:
      • (1-31).
  • Return Value:

    • On success return NoError.
    On fail return DateError(-18).
  • Demo program:

    • datetime\dt.c
[Index] [Back]
[MiniOS7 Library reference : SetDate] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetLedL1

SetLedL1()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetLedL1 |  |  | * |  |  |
SetLedL2 |  |  | * |  |  |
SetLedL3 |  |  | * |  |  |

  • Description:

    • Set the display mode of LED (L1/L2/L3)on I-8000 series.
  • Declaration:

    • void SetLedL1(int mode);
    void SetLedL2(int mode);
    void SetLedL3(int mode);
  • Input Parameter:

    • mode:
      0 (LED_OFF): Dark LED.
      1 (LED_ON): Light LED.
      2 (LED_TOGGLE): Toggle LED status.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetLedL1] Ver.1.3.1
Final update date:[03/27/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetPioDir

SetPioDir()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetDio4Dir |  | * |  | * | * | *
SetDio9Dir |  | * |  | * | * | *
SetDio14Dir |  | * |  | * | * | *
SetTi0Dir |  | * | * | * | * | *
SetTi1Dir |  | * | * | * | * | *
SetTo0Dir |  | * | * | * | * | *
SetTo1Dir |  | * | * | * | * | *

  • Description:

    • Set the PIO pin to Input/Output mode.
  • Declaration:

    • void SetDio4Dir(int dir);
    void SetDio9Dir(int dir);
    void SetDio14Dir(int dir);
    void SetTi0Dir(int dir);
    void SetTi1Dir(int dir);
    void SetTo0Dir(int dir);
    void SetTo1Dir(int dir);
  • Input Parameter:

    • dir:

      • 0 : set to output mode.
      1 : Set to Input mode with pullup or pulldown.
      2 : Set to Input mode without pullup or pulldown(TO_0 & TO_1).
      3 : Set to Normal mode.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetPioDir] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetPioHigh

SetPioHigh()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetDio4High |  | * |  | * | * | *
SetDio9High |  | * |  | * | * | *
SetDio14High |  | * |  | * | * | *
SetDO1High |  | * |  | * | * | *
SetDO2High |  | * |  | * | * | *
SetDO3High |  | * |  | * | * | *
SetTi0High |  | * | * | * | * | *
SetTo0High |  | * | * | * | * | *
SetTi1High |  | * | * | * | * | *
SetTo1High |  | * | * | * | * | *
ClockHigh | * | * | * | * | * | *

  • Description:

    • When the DIO pin is set to output mode, call these functions will set these pins to output High.
  • Declaration:

    • void SetDio4High(void);
    void SetDio9High(void);
    void SetDio14High(void);
    void SetDO1High(void);
    void SetDO2High(void);
    void SetDO3High(void);
    void SetTi0High(void);
    void SetTo0High(void);
    void SetTi1High(void);
    void SetTo1High(void);
    void ClockHigh(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetPioHigh] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetPioLow

SetPioLow()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetDio4Low |  | * |  | * | * | *
SetDio9Low |  | * |  | * | * | *
SetDio14Low |  | * |  | * | * | *
SetDO1Low |  | * |  | * | * | *
SetDO2Low |  | * |  | * | * | *
SetDO3Low |  | * |  | * | * | *
SetTi0Low |  | * | * | * | * | *
SetTo0Low |  | * | * | * | * | *
SetTi1Low |  | * | * | * | * | *
SetTo1Low |  | * | * | * | * | *
ClockLow | * | * | * | * | * | *

  • Description:

    • When the DIO pin is set to output mode, call these functions will set these pins to output Low.
  • Declaration:

    • void SetDio4Low(void);
    void SetDio9Low(void);
    void SetDio14Low(void);
    void SetDO1Low(void);
    void SetDO2Low(void);
    void SetDO3Low(void);
    void SetTi0Low(void);
    void SetTo0Low(void);
    void SetTi1Low(void);
    void SetTo1Low(void);
    void ClockLow(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetPioLow] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetRtsActive

SetRtsActive()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetRtsActive1 | *2 | *1 |  |  |  |
SetRtsActive3 |  | *3 | *2 | *2 | * | *
SetRtsActive4 |  |  | *2 |  |  |
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Set COM1's RTS pin output LOW (RS-232 is low active).
  • Declaration:

    • void SetRtsActive1(void);
    void SetRtsActive3(void);
    void SetRtsActive4(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetRtsActive] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetRtsInActive

SetRtsInActive()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetRtsInActive1 | *2 | *1 |  |  |  |
SetRtsInActive3 |  | *3 | *2 | *2 | * | *
SetRtsInActive4 |  |  | *2 |  |  |
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Set COM1's RTS pin output HIGH (RS-232 is low active).
  • Declaration:

    • void SetRtsInActive1(void);
    void SetRtsInActive3(void);
    void SetRtsInActive4(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetRtsInActive] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetScanBuffer

SetScanBuffer()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetScanBuffer | * | * | * | * | * | *

  • Description:

    • Set user's buffer for Scanf. The default buffer size is 80 bytes, if need more space, user's program must support the buffer.
  • Declaration:

    • void SetScanBuffer(unsigned char *buf,int len);
  • Input Parameter:

    • buf:the new buffer for Scanf to use.
    len:length of buffer -1.
  • Return Value:

    • None.
  • Demo program:

    • scanf.c
[Index] [Back]
[MiniOS7 Library reference : SetScanBuffer] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetTime

MiniOS7 Library reference :
SetTime()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetTime | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Set the system time to the RTC of 7188x.
  • Declaration:

    • int SetTime(int hour,int minute,int sec);
  • Input Parameter:

    • hour:
      • 0-23.
    • minute:
      • 0-59.
    • sec:
      • 0-59.
  • Return Value:

    • On success return NoError.
    On fail return TimeError(-19).
  • Demo program:

    • datetime\dt.c
[Index] [Back]
[MiniOS7 Library reference : SetTime] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SetWeekDay

SetWeekDay()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SetWeekDay | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Set the weekday to the RTC.
    When use MiniOS7 command "date" to set date, MiniOS7 will calculate the right weekday and set to RTC. If user call SetDate(), it also will calculate the right weekday and set to RTC. But if user call SetWeekDay( ) need to calculate the right weekday himself.
  • Declaration:

    • void SetWeekDay(int day);
  • Input Parameter:
    • day:
      0:Sunday, 1-6:Monday to Saturday.
  • Return Value:

    • None.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : SetWeekDay] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Show5DigitLed

Show5DigitLed()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Show5DigitLed | * | * | * | * | * | *

  • Description:

    • Show one digit of the 5-Digit Led.
  • Declaration:

    • int Show5DigitLed(int pos,int data);
  • Input Parameter:
    • pos:
      • pos can be 1,2,3,4 or 5.
      1 for the left most position.
      5 for the right most position.
    • data:
      • range from 0 to 17.
      0 to 15 show the hexadecmial Digit('0','1',...'A','b','C','d','E','F')
      16 show blank, 17 show '-'.
      0 | 1 | 2 | 3
4 | 5 | 6 | 7
8 | 9 | 10(0x0A) | 11(0x0b)
12(0x0C) | 13(0x0d) | 14(0x0E) | 15(0x0F)
16(space) | 17(dash) |  |
  • Return Value:

    • On success return NoError.
    On fail return Error code,PosError(-8).
  • Demo program:

    • demo96.c.
[Index] [Back]
[MiniOS7 Library reference : Show5DigitLed] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Show5DigitLedSeg

Show5DigitLedSeg()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Show5DigitLedSeg | * | * | * | * | * | *

  • Description:

    • Show any segment of the 5-Digit Led and also can show the DOT '.'.
  • Declaration:

    • int Show5DigitLedSeg(int pos,int data);
  • Input Parameter:
    • pos:
      • pos can be 1,2,3,4 or 5.
      1 for the left most position.
      5 for the right most position.
    • data:
      • range from 0 to 255.
      Bit 0 to 7 control the 8 segments (7-segment + dot), as the left figure.
      if the bit is 1, the segment will be turn on,
      if the bit is 0, the segment will be turn off.
      For example, If user want to display a 'L', must light segment 1,2,3
      so, the data must be 0x0E(=00001110b).
  • Return Value:

    • On success return NoError.
    On fail return Error code,PosError(-8).
  • Demo program:

    • demo96.c.
[Index] [Back]
[MiniOS7 Library reference : Show5DigitLedSeg] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Show5DigitLedWithDot

Show5DigitLedWithDot()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Show5DigitLedWithDot | * | * | * | * | * | *

  • Description:

    • Show one digit of the 5-Digit Led and also show the DOT '.'.
  • Declaration:

    • int Show5DigitLedWithDot(int pos,int data);
  • Input Parameter:
    • pos:
      • pos can be 1,2,3,4 or 5.
      1 for the left most position.
      5 for the right most position.
    • data:
      • range from 0 to 17.
      0 to 15 show the hexadecmial Digit with dot('0.','1.',...'A.','b.','C.','d.','E.','F.')
      16 show only dot'.', 17 show '-.'.
      0 | 1 | 2 | 3
4 | 5 | 6 | 7
8 | 9 | 10(0x0A) | 11(0x0b)
12(0x0C) | 13(0x0d) | 14(0x0E) | 15(0x0F)
16(space) | 17(dash) | - | -
 |  | - | -
  • Return Value:

    • On success return NoError.
    On fail return Error code,PosError(-8).
  • Demo program:

    • demo96.c.
[Index] [Back]
[MiniOS7 Library reference : Show5DigitLedWithDot] Ver.1.3.1
Final update date:[03/07/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ShowLED8

ShowLED8()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ShowLED8 |  |  | * |  |  |
ShowLED16 |  |  | * |  |  |

  • Description:
    Set the LED display values on the I-8000 add-on cards. Only for DO16/DI8_DO8 add-on cards.
  • Declaration:

    • void ShowLED8(int slot ,unsigned char data);
    void ShowLED16(int slot ,unsigned data);
  • Input Parameter:
    • slot:
      For 4 slots: 0-3.
      For 8 slots: 0-7.
    • data:
      The value for LED to display, one bit control one LED, 1:light LED,0:dark LED.
  • Return Value:
    None.,
  • Demo program:
    None.
[Index] [Back]
[MiniOS7 Library reference : ShowLED8] Ver.1.3.1
Final update date:[03/26/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : StopWatchContinue

StopWatchContinue()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
StopWatchContinue | * | * | * | * | * | *

  • Description:

    • Continue the StopWatch.
  • Declaration:

    • int StopWatchContinue(int channel);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return NoError.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : StopWatchContinue] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : StopWatchPause

StopWatchPause()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
StopWatchPause | * | * | * | * | * | *

  • Description:

    • Pause the StopWatch. After call StopWatchPause can call StopWatchContinue to continue count time.
  • Declaration:

    • int StopWatchPause(int channel);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return NoError.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : StopWatchContinue] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : StopWatchReadValue

StopWatchReadValue()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
StopWatchReadValue | * | * | * | * | * | *

  • Description:

    • Read current StopWatch value, the value stand for the time from call StopWatchStart/StopWatchReset to now.
  • Declaration:

    • int StopWatchReadValue(int channel,unsigned long *value);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
    • value:
      • a pointer for the value to be stored.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return NoError.
  • Demo program:

    • demo92.c
[Index] [Back]
[MiniOS7 Library reference : StopWatchReadValue] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : StopWatchReset

StopWatchReset()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
StopWatchReset | * | * | * | * | * | *

  • Description:

    • Reset the StopWatch value to 0.
  • Declaration:

    • int StopWatchReset(int channel);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return NoError.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : StopWatchReset] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : StopWatchStart

StopWatchStart()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
StopWatchStart | * | * | * | * | * | *

  • Description:

    • Start to use a StopWatch channel, and reset the StopWatch value to 0.
    Then, the system timer ISR will increment the StopWatch value by 1 every 1 ms.
  • Declaration:

    • int StopWatchStart(int channel);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return NoError.
  • Demo program:

    • demo92.c
[Index] [Back]
[MiniOS7 Library reference : StopWatchStart] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : StopWatchStop

StopWatchStop()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
StopWatchStop | * | * | * | * | * | *

  • Description:

    • Disable the StopWatch channel. Then, the system timer ISR will stop to increment the StopWatch value.
  • Declaration:

    • int StopWatchStop(int channel);
  • Input Parameter:

    • channel:
      • 0-7, total 8 channels.
  • Return Value:

    • If channel is out of range return ChannelError(-15).
    On success return NoError.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : StopWatchStop] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : SystemSerialNumber

SystemSerialNumber
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
SystemSerialNumber |  |  | * | * | * | *

  • Description:

    • 7188X/I-8000/7188E series can add one serial number IC(DS2502). After power on, MiniOS7 will read the serial number, and save to ram.
    The serial number length is 8 bytes, SystemSerialNumber[0..7]. If all values are 0x5A means can not find the DS2502, if all values are 0xAA means CRC error for the serial number..
    Use MiniOS7 command VER will show the serial number. In user's program can use following code to show the serial number:

    Print("Serial Number : ");
    for(i=0;i<8;i++){
    Print("%02X ",SystemSerialNumber[i]);
    }
  • Declaration:

    • extern unsigned char far const *SystemSerialNumber;
  • Demo program:

    • DEMO\SERIAL\SERIAL.C
[Index] [Back]
[MiniOS7 Library reference : SystemSerialNumber] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : TimerClose

TimerClose()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
TimerClose | * | * | * | * | * | *

  • Description:

    • Stop to use 7188x's timer function. If the program has call OpenTimer, before exit it must call TimerClose. Otherwise, the system must down.
  • Declaration:

    • int TimerClose(void);
  • Input Parameter:

    • None.
  • Return Value:

    • Always return NoError.
  • Demo program:

    • demo90.c to demo98.c
[Index] [Back]
[MiniOS7 Library reference : TimerClose] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : TimerOpen

MiniOs7 Єєµ{¦Ў®w»Ў©ъ
TimerOpen()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
TimerOpen | * | * | * | * | * | *

  • Description:

    • Start to use 7188x's timer function. Before use any timer function must call TimerOpen. After call TimerOpen user can use 8 StopWatchTimer and 8 CountDownTimer and the system timer. User also can insatll user's timer function, system will call user's timer function every 1ms.
  • Declaration:

    • int TimerOpen(void);
  • Input Parameter:

    • None.
  • Return Value:

    • On success return NoError.
    If Timer is already opend,return 1.
  • Demo program:

    • demo90.c to demo98.c
[Index] [Back]
[MiniOS7 Library reference : TimerOpen] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : TimerReadValue

TimerReadValue()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
TimerReadValue | * | * | * | * | * | *

  • Description:

    • Read main time ticks. the time unit for ticks is 1 ms. When TimerOpen or call TimerReset will reset the valuse to 0.
  • Declaration:

    • unsigned long TimerReadValue(void);
  • Input Parameter:

    • None.
  • Return Value:

    • The timer ticks since TimerOpen or call TimerReset.
  • Demo program:

    • demo90.c
[Index] [Back]
[MiniOS7 Library reference : TimerReadValue] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : TimerResetValue

TimerResetValue()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
TimerResetValue | * | * | * | * | * | *

  • Description:

    • Reset the main time ticks to 0.
  • Declaration:

    • void TimerResetValue(void);
  • Input Parameter:

    • None.
  • Return Value:

    • None.
  • Demo program:

    • demo90.c
[Index] [Back]
[MiniOS7 Library reference : TimerResetValue] Ver.1.3.1
Final update date:[03/08/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ToCom

ToCom()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ToCom | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
ToCom0 |  |  | *1 |  |  |
ToCom1 | *2 | *1 | *1 | *1 | * | *
ToCom2 | *2 | *1 | *2 | *1 | * | *
ToCom3 | *1 | *3 | *2 | *2 | * | *
ToCom4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Send out one byte data to COM port. (the data will be put on output buffer first, when the hardware output buffer is empty, the data will be send out by ISR. )
  • Declaration:

    • int ToCom(int port, int data);
    int ToCom0(int data);
    int ToCom1(int data);
    int ToCom2(int data);
    int ToCom3(int data);
    int ToCom4(int data);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • data:
      • 0-255, the data to be send out.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    On success return NoError.
    else return TimeOut(-5).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ToCom] Ver.1.3.1
Final update date:[03/21/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ToComBufn

ToComBufn()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ToComBufn | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
ToCom0Bufn |  |  | *1 |  |  |
ToCom1Bufn | *2 | *1 | *1 | *1 | * | *
ToCom2Bufn | *2 | *1 | *2 | *1 | * | *
ToCom3Bufn | *1 | *3 | *2 | *2 | * | *
ToCom4Bufn | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Send out n bytes data to COM port.
  • Declaration:

    • int ToComBufn(int port,char *buf,int no);
    int ToCom0Bufn(char *buf,int no);
    int ToCom1Bufn(char *buf,int no);
    int ToCom2Bufn(char *buf,int no);
    int ToCom3Bufn(char *buf,int no);
    int ToCom4Bufn(char *buf,int no);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • buf:
      • the data buffer.
    • no:
      • the data number(bytes) to be send out.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    On success return NoError.
    On error return TimeOut(-5).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ToComBufn] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : ToComStr

ToComStr()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
ToComStr | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
ToCom0Str |  |  | *1 |  |  |
ToCom1Str | *2 | *1 | *1 | *1 | * | *
ToCom2Str | *2 | *1 | *2 | *1 | * | *
ToCom3Str | *1 | *3 | *2 | *2 | * | *
ToCom4Str | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Send out a string(end with '\0') to COM port.
  • Declaration:

    • int ToComStr(int port, char *str);
    int ToCom0Str(char *str);
    int ToCom1Str(char *str);
    int ToCom2Str(char *str);
    int ToCom3Str(char *str);
    int ToCom4Str(char *str);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
    • str:
      • the string to be send out.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    On success return NoError.
    On error return TimeOut(-5).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : ToComStr] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : Ungetch

Ungetch()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
Ungetch | * | * | * | * | * | *

  • Description:

    • Put one character back to COM1's input buffer. If there is no data in the input buffer when call Ungetch, next time call Getch() will return the data.
  • Declaration:

    • int Ungetch(int data);
  • Input Parameter:

    • data:
      • 0 to 255. If data > 255, only the low byte will be send out.
  • Return Value:

    • On success return NoError.
    On fail(the buffer is full) return 1.
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : Ungetch] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : WaitTransmitOver

WaitTransmitOver()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
WaitTransmitOver | *1,*2 | *1,*3 | *1,*2 | *1,*2 | * | *
WaitTransmitOver0 |  |  | *1 |  |  |
WaitTransmitOver1 | *2 | *1 | *1 | *1 | * | *
WaitTransmitOver2 | *2 | *1 | *2 | *1 | * | *
WaitTransmitOver3 | *1 | *3 | *2 | *2 | * | *
WaitTransmitOver4 | *1 | *3 | *2 | *2 | * | *
*1:use Am188ES internal uart *2:use 16C550 *3:use 16C550 on the X500/X501/X502

  • Description:

    • Wait all data on output buffer of COM port to be send out.
  • Declaration:

    • int WaitTransmitOver(int port);
    int WaitTransmitOver0(void);
    int WaitTransmitOver1(void);
    int WaitTransmitOver2(void);
    int WaitTransmitOver3(void);
    int WaitTransmitOver4(void);
  • Input Parameter:

    • port:
      • 0/1/2/3/4 for COM0/1/2/3/4.
  • Return Value:

    • If prot is not 0/1/2/3/4 return PortError(-1).
    On success return NoError.
    else return TimeOut(-5).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : WaitTransmitOver] Ver.1.3.1
Final update date:[03/20/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : WriteEEP

MiniOs7 Library
WriteEEP()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
WriteEEP | * | * | * | * | * | *

  • Description:

    • Write one byte data to EEPROM.
  • Declaration:

    • int WriteEEP(int block, int addr, int data);
  • Input Parameter:

    • block:
      • 0 to 7(total 8 blocks).
    • addr:
      • 0 to 255(every block has 256 bytes).
    • data:
      • 0 to 255(8-bit data).
  • Return Value:

    • On success return NoError.
    On fail return Error code. BlockError(-10) or AddrError(-9) or WriteError(-11).
  • Demo program:

    • demo6.c
[Index] [Back]
[MiniOS7 Library reference : WriteEEP] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference : WriteNVRAM

MiniOS7 Library reference :
WriteNVRAM()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
WriteNVRAM | * | (*) | (*) | * | * | *
(*)The module must with RTC to make the function work.

  • Description:

    • Write data to NVRAM.
  • Declaration:

    • int WriteNVRAM(int addr, int data);
  • Input Parameter:

    • addr:
      • 0-30.
    • data:
      • One byte data(0-255).
      If data>255, only the low byte will be write to NVRAM.
  • Return Value:

    • On success return NoError.
    On fail return AddrError(-9).
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : WriteNVRAM] Ver.1.3.1
Final update date:[03/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for 5DigitLed & red led

For 5DigitLed & red led
Remark
[7188XC/I-7188/I-8000 series]

The left most is position 1,the right most is position 5

  1. 5DigitLed for I-7188/7188x series is optional, but for I-8000 series is built-in. It is 5 7-seg LED with the point. The default message diplay device for these modules.
    User can use it to show : message number, address, time,... and so on.

  2. The Red Led will light after the module is power on. User's program also can control it.

Functions for Red Led & 5DigitLed
Function | Description
LedOn | Turn on the red LED.
LedOff | Turn off the red LED.
LedToggle | Toggle the status of the red LED.
Init5DigitLed | Initialize the 5DigitLed.
Show5DigitLed | Display one digit on 5DigitLed
Show5DigitLedWithDot | Display one digit on 5DigitLed, also show the point('.').
Show5DigitLedSeg | Control all segment of one 5DigitLed
Disable5DigitLed | Disable 5DigitLed, all segment will dark.
Enable5DigitLed | Enable 5DigitLed, the user can control it.
Set5DigitLedTestMode | Test 5DitgitLed, all segment will be turn on.
Set5DigitLedIntensity | Set the 5DigitLed light intensity.
[Index] [Back]
[MiniOS7 Library reference for 5DigitLed & red led] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for COM ports

for COM ports
About the comport hardware
[7188XC]

  1. 7188XC/7521 default with two COM PORTS, COM1 is both RS-232 and RS-485(use diffrenet pins), COM2 is RS-485.

  2. COM1 is the standard I/O port of MiniOS7. Use to receive command and download files. User's program also can use COM1 connect to other RS-232/RS-485 device.

  3. These two COM PORTS use the internal UART of CPU(Am188ES), not compatible with 16C550 on hardward level.

  4. The RS-485 of 7188XC/7521 built-in Self-Tuner. So software need not to control the data direction of RS-485 bus.

  5. 7522/7523 are 7521 add one small borad(X501/X502) to add 1 or 2 RS-232 ports (COM3/4).

[8000]

  1. I-8000 series suooprt up to 5 COM ports.
    • COM0:(RS-232)(CPU internal uart) For 87K modules.
    • COM1:(RS-232)(CPU internal uart) The default standard I/O port of MiniOS7. Use to receive command and download files. User's program also can use COM1 connect to other RS-232 device.
    • COM2:(RS-485)(16c550) The maximun baud rate is 921000.
    • COM3:(RS-232/RS-485)(16c550)(support RS-232 signals:RX,TX,CTS,RTS,GND)
    • COM4:(RS-232)(16c550)(9 wires)

[I-7188]

  1. I-7188 support 4 COM ports.
    • COM1:(RS-232/RS-485)(16c550)(RS-232 support 9 wires)(use jumpper to select RS-232 or RS-485)(RS-485 without built-in Self-Tuner)
    • COM2:(RS-485)(16c550).(without built-in Self-Tuner)
    • COM3:(RS-232)(CPU internal uart).
    • COM4:(RS-232)(CPU internal uart) The default standard I/O port of MiniOS7. Use to receive command and download files. User's program also can use COM4 connect to other RS-232 device.

MiniOS7 Library reference for COM ports

  1. [InstallCom], [InstallCom0], [InstallCom1], [InstallCom2], [InstallCom3], [InstallCom4]
  2. [RestoreCom], [RestoreCom0], [RestoreCom1], [RestoreCom2], [RestoreCom3], [RestoreCom4]
  3. [IsCom], [IsCom0], [IsCom1], [IsCom2], [IsCom3], [IsCom4]
  4. [ReadCom], [ReadCom0], [ReadCom1], [ReadCom2], [ReadCom3], [ReadCom4]
  5. [ToCom], [ToCom0], [ToCom1], [ToCom2], [ToCom3], [ToCom4]
  6. [ToComStr], [ToCom0Str], [ToCom1Str], [ToCom2Str], [ToCom3Str], [ToCom4Str]
  7. [ToComBufn], [ToCom0Bufn], [ToCom1Bufn], [ToCom2Bufn], [ToCom3Bufn], [ToCom4Bufn]
  8. [ClearCom], [ClearCom0], [ClearCom1], [ClearCom2], [ClearCom3], [ClearCom4]
  9. [WaitTransmitOver], [WaitTransmitOver0], [WaitTransmitOver1], [WaitTransmitOver2], [WaitTransmitOver3], [WaitTransmitOver4]
  10. [DataSizeInCom], [DataSizeInCom0], [DataSizeInCom1], [DataSizeInCom2], [DataSizeInCom3], [DataSizeInCom4]
  11. [SetRtsActive1], [SetRtsActive3], [SetRtsActive4]
  12. [SetRtsInactive1], [SetRtsInactive3], [SetRtsInactive4]
  13. [printCom], [printCom0], [printCom1], [printCom2], [printCom3], [printCom4]
  14. [GetCtsStatus1], [GetCtsStatus3], [GetCtsStatus4]
  15. [IsTxBufEmpty], [IsTxBufEmpty0], [IsTxBufEmpty1], [IsTxBufEmpty2], [IsTxBufEmpty3], [IsTxBufEmpty4]
  16. [SetBaudrate], [SetBaudrate0], [SetBaudrate1], [SetBaudrate2], [SetBaudrate3], [SetBaudrate4]
  17. [SendBreak], [SendBreak0], [SendBreak1], [SendBreak2], [SendBreak3], [SendBreak4]
  18. [IsDetectBreak], [IsDetectBreak0], [IsDetectBreak1], [IsDetectBreak2], [IsDetectBreak3], [IsDetectBreak4]
  19. [ClearTxBuffer], [ClearTxBuffer0], [ClearTxBuffer1], [ClearTxBuffer2], [ClearTxBuffer3], [ClearTxBuffer4]
History
[06/16/2000]
  1. Add new function for 7522/7523(COM3/COM4).
  2. COM3 for 7522/7523 with the signal RTS/CTS, so add functions : SetRtsActive3/SetRtsInactive3/GetCtsStatus3, And rename the functions : SetRtsActive/SetRtsInactive/GetCtsStatus to SetRtsActive1/SetRtsInactive1/GetCtsStatus1.
[11/27/2000]
  1. Begin Version 1.3.1.
[Index] [Back]
[MiniOS7 Library reference for COM ports] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for Connect to I-7000 modules

for Connect to I-7000 modules
Remark
  1. When user want use 7188X/I-8000 series to control I-7000 series module can use the following two function.
  2. After call SendCmdTo7000 must call ReceiveResponseFrom7000 to receive the response of I-7000 module. (P.S. If the command without response need not call ReceiveResponseFrom7000.)
Functions for Connect to I-7000 modules
  1. SendCmdTo7000
  2. ReceiveResponseFrom7000
Version history
[12/20/2000]
  1. Start Version 1.3.2
  2. I-7188XC series, I-8000 series and I-7188 all reference to this document.
[Index] [Back]
[MiniOS7 Library reference for Connect to I-7000 modules] Ver.1.3.1
Final update date:[02/13/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for EEPROM

for EEPROM
About the EEPROM hardware
  1. The EEPROM of 7188x/I-8000 series is 24LC16, with :
    8 blocks(block 0 to 7),
    every block has 256 bytes(address 0 to 255),
    So the total size of EEPROM is 2048(2K) bytes.
  2. After boot EEPROM is set on write protect mode.
    Before write data to EEPROM must call EnableEEP() or EE_WriteEnable() set EEPROM to write-enable mode.
    After write data to EEPROM, it is better call ProtectEEP() or EE_WriteProtect() set EEPROM back to write-protect mode.
Functions for Read/Write EEPROM
1st group functions
  1. WriteEEP
  2. ReadEEP
  3. EnableEEP
  4. ProtectEEP
2nd group functions(Don't use with 1st group functions)
  1. EE_WriteEnable
    2. (10/16/2000 add)
  2. EE_WriteProtect
    3. (10/16/2000 add)
  3. EE_RandomRead
    4. (10/16/2000 add)
  4. EE_ReadNext
    5. (10/16/2000 add)
  5. EE_MultiRead
    6. (10/16/2000 add)
  6. EE_RandomWrite
    7. (10/16/2000 add)
  7. EE_MultiWrite
    8. (10/16/2000 add)
History
[05/09/2000]
  1. Fisrt version OK.
[10/17/2000]
  1. Add 2nd group functions.
[12/13/2000]
  1. Ver.1.3.2.
  2. For I-7188X/I-8000 series/I-7188 modules.
[Index] [Back]
[MiniOS7 Library reference for EEPROM] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for File reading

for File reading
Remark
  1. The file system for MiniOS7 support user's program to read files, but not support user's program to write files.
Functions for File reading
  1. GetFileNo
  2. GetFileName
  3. GetFilePositionByNo
  4. GetFilePositionByName
  5. GetFileInfoByNo
  6. GetFileInfoByName
Version history
[12/19/2000]
  1. Start Version 1.3.2
  2. I-7188XC series, I-8000 series and I-7188 all reference to this document.
[Index] [Back]
[] Ver.1.3.1
Final update date:[02/13/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for Flash memory

For Flash Memory
Remark
  1. There are two size for the Flash Memory used on 7188x/I-8000 series. 256K bytes and 512K bytes. MiniOs7 will use the last 64K bytes, others are used to store user's program or data. User's program also can use functions to write data to Flash Memory.
  2. When use want write data to Flash Memory, it only can be write from "1" to "0", can not be write from "0" to "1". So in generally, before write data to FLASH, must erase it, the erase process will make all data to 0xFF, that is all data bit is "1". The any data can be write to it.
  3. The function FlashErase() is used to erase the FLASH, every time one sector(64K bytes).

Functions For Flash Memory
Function | Description
FlashReadId | Get the imformation about FLASH.
FlashErase | ERASE one sector of flash.
FlashWrite | Write one byte data to FLASH.
FlashRead | Read one byte data from FLASH.
Version History
[12/19/2000]
  1. Start Version 1.3.2
  2. I-7188XC series, I-8000 series and I-7188 all reference to this document.
[Index] [Back]
[MiniOS7 Library reference for Flash memory] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for I-8000 only

for I-8000 only
Remark

  1. This document is for I-8000 serier only. For the backplane and add on modules of I-8000.

  2. To communicate with 87K add on modules must use COM0 to send/receive command, and also must use ChangeToSlot( ) to select one slot connect to COM0.

  3. Every I-8000 module can set its system ID, the system ID can be read by function GetNetId( ).

  4. Threr are two kinds of backplane for I-8000, one with 4 slot and another one with 8 slot. Program can call GetNumberOfSlot( ) to get the slot number.

  5. Threr are 3 system LED for I-8000, L1/L2/L3. Can use SetLedL1( )/SetLedL2( )/SetLedL3( ) to control these LEDs.

  6. Terer are 4 system key for I-8000, SET, MODE, UP, DOWN. Can use IsSytemKey( ) to check if any key is available, use GetSytemKey( ) to read the system key, use ClearSystemKey( ) to clear all system key input on the buffer.

  7. For the LED on the add on modules of I-8000, if <= 8 LEDS, the hardware will auto control the LED display. But if >8 LEDs , must use software to control the display of LEDs.
    And MiniOS7 will do it. For D/I modules MiniOS7 will get the value from the add on modules, for D/O modules must call ShowLED16( )/ShowLED8( ) send the display to MiniOS7.

  8. For D/I modules, if input channels <= 8 can use DI_8( ) to get the input value.
    if input channels are between 9 to 16 can use DI_16( ) to get the input value.

  9. For D/O modules, if output channels <= 8 can use DO_8( ) to set output value.
    if output channels are between 9 to 16 can use DO_16( ) to set the output value.
    But if 8 D/I and 8 D/O at the same module must use DIO_DO_8() to set output value.
    All these three functions will set the LED display value for MiniOS7, so need not to call ShowLED16( ) or ShowLED8( ) again.

Functions for I-8000 only
1 | ChangeToSlot | Set COM0 connect to someone slot.
2 | SetA9 SetA12 SetB1A5 SetB1A6 | Set base plane signal B1A5 , B1A6 A9, A12.
3 | GetNetId | Get system ID.
4 | ModuleType NameOfModule | Get add on module's name.
5 | ShowLED8 ShowLED16 | Show add on module's led.
6 | GetNumberOfSlot | Fet the slot number of back plane.
7 | DO_16 DO_8 DIO_DO_8 DI_16 DI_8 UDIO_DO16 UDIO_DI16 UDIO_ReadConfig_16 UDIO_WriteConfig_16 | Set the output of add on module.
8 | SetLedL1 SetLedL2 SetLedL3 | Set the display status of system LED.
9 | ClrSlotInt | Clear the interrupt signal of the last 4 slots on 8 slot backplane.
10 | GetSlotInt | Get the interrupt signal status of the last 4 slots on 8 slot backplane.
11 | IsSytemKey | Check if any system key input is avaible.
12 | GetSytemKey | Read one system key input from system key buffer.
13 | ClearSystemKey | Clear the system key input buffer.
Version history
[11/10/2003]
  1. Add 4 functions: to support Universal Digital DIO modules
[01/29/2001]
  1. Add 3 functions: IsSytemKey(), GetSytemKey(), ClearSystemKey().
[12/20/2000]
  1. Start Version 1.3.2
  2. Only I-8000 series reference to this document.
[Index] [Back]
[MiniOS7 Library reference for I-8000 only] Ver.1.3.1
Final update date:[11/10/2003], By: Tsai, Kun-Ting.
Any question please E-Mail to: ICPDAS_SERVICE


MiniOS7 Library reference for NVRAM & RTC

For NVRAM & RTC
About the RTC & NVRAM hardware
  1. Only when the hardware with RTC(Real Time Clock), then user can use 31 bytes NVRAM to store data.
  2. Only when user's program need to record/know current time/date need to use RTC.
    For example, if want to turn on the light at 8:00 AM and turn off it at 5:00 PM .
  3. NVRAM is SRAM, but use battary to keep the data, so when the module is power off the data in NVRAM will not lost. And NVRAM without re-write times limit.(FLASH & EEPROM all has re-write limit.) If without leakage current, the battary can sue 10 years.
  4. The following functions will work if the module with RTC.
    (The standard version of 7188XC/7521 without RTC.)
Functions for NVRAM and RTC
  1. ReadNVRAM
  2. WriteNVRAM
  3. GetTime
  4. SetTime
  5. GetDate
  6. SetDate
  7. GetWeekDay
  8. SetWeekDay
Version history
[12/14/2000]
  1. Start Version 1.3.2
  2. I-7188XC series, I-8000 series and I-7188 all reference to this document.
[Index] [Back]
[MiniOS7 Library reference for NVRAM & RTC] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for Programable I/O pins

MiniOS7 Library reference for
for Programable I/O pins
[Index] [Back]
Remark
  1. The CPU(Am188ES) has 32 PIO pins, and some can be used by user on 7188x/I-8000 series. The following functions can help user to use those PIO pins.
Functions for Programable I/O pins
  1. [SetDio4Dir], [SetDio9Dir], [SetDio14Dir], [SetTi0Dir], [SetTo0Dir], [SetTi1Dir], [SetTo1Dir]
  2. [SetDio4High], [SetDio9High], [SetDio14High], [SetDO1High], [SetDO2High], [SetDO3High], [SetTi0High], [SetTo0High], [SetTi1High], [SetTo1High], [ClockHigh]
  3. [SetDio4Low], [SetDio9Low], [SetDio14Low], [SetDO1Low], [SetDO2Low], [SetDO3Low], [SetTi0Low], [SetTo0Low], [SetTi1Low], [SetTo1Low], [ClockLow]
  4. [GetDio4], [GetDio9], [GetDio14], [GetDI2], [GetDI3], [GetDO1], [GetDO2], [GetDO3], [GetTi0], [GetTo0], [GetTi1], [GetTo1]
  5. ClockHighLow
Version history
[12/20/2000]
  1. Start Version 1.3.2
  2. I-7188XC series, I-8000 series and I-7188 all reference to this document.
[Index] [Back]
[MiniOS7 Library reference for Programable I/O pins] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for stdio & misc functions

for stdio & misc functions
Remark

  1. COM1 of 7188X/I_8000 series is the standard I/O port, before user's program call InstallCom1( ) also can use Kbhit( ), Getch( ), Putch( ), Print( ), Scanf( )... to send/receive data to/from COM1.

  2. After call Installcom1( ) the above functions will not work, must use IsCom1( ), ToCom1( ), ReadCom1( ) ... to send/receive data to/from COM1. Until call RestoreCom1( ) then the above functions will work again.

  3. Scanf() cannot be used on MSC/VC++ . Please use LineInput() + sscanf() instead.
[Note:]The standard I/O port of I-7188 & 7188XA is COM4.
Functions for stdio & misc functions
  1. Kbhit
  2. Getch
  3. Ungetch
  4. Putch
  5. Puts
  6. Print
  7. Is7188x, Is8000
  8. GetLibVersion
  9. ReadInitPin
  10. LineInput
  11. ResetScanBuffer
  12. SetScanBuffer
  13. Scanf

  14. SystemSerialNumber
Version history
[12/20/2000]
  1. Start Version 1.3.2
  2. I-7188XC series, I-8000 series and I-7188 all reference to this document.
[Index] [Back]
[MiniOS7 Library reference for stdio & misc functions] Ver.1.3.1
Final update date:[02/02/2001], By: Tsai,Kun-Ting.


MiniOS7 Library reference for Timer & WatchDog Timer

For TIMER & WatchDog Timer
Remark
  1. MiniOS7 use the TIMER 2(one of CPU internal timer) as system Timer. It is 16-bits timer, and be programmed to generate interrupt every 1 ms. So the accuracy of system is 1 ms.

    2. P.S. I-8000 system's timer is programmed to generate interrupt every 5 ms.
  2. User can install user's timer function, every 1 ms will be called once. It is suitable to check system status in fixed time period.
  3. The system timer ISR will call INT 9 every time, and every 55 ms will call INT 0x1C, The timer functions of library is inatalled on INT 9, so it will be called every 1ms.

    4. P.S. The timer functions of I-8000's library use timer 1,it is programmed to generate interrupt every 1 ms.
  4. Timer function support 8 StopWatchs and 8 CountDownTimers and 1 MainTimer.
Functions for Timer & WatchDog Timer
  1. TimerOpen
  2. TimerClose
  3. TimerResetValue
  4. TimerReadValue
  5. DelayMs
  6. StopWatchReset
  7. StopWatchStart
  8. StopWatchStop
  9. StopWatchPause
  10. StopWatchContinue
  11. StopWatchReadValue
  12. CountDownTimerStart
  13. CountDownTimerReadValue
  14. InstallUserTimer
  15. InstallUserTimer1C
  16. EnableWDT
  17. DisableWDT
  18. RefreshWDT
History
[12/19/2000]
  1. Start Version 1.3.2
  2. I-7188XC series, I-8000 series and I-7188 all reference to this document.
[Index] [Back]
[MiniOS7 Library reference for Timer & WatchDog Timer] Ver.1.3.1
Final update date:[02/13/2001], By: Tsai,Kun-Ting.


MiniOS7 Library referenceEE_ReadNext

EE_ReadNext()
[Index] [Back]
Function | I7188 | 7188XC | 8000 | 7188XA | 7188XB | 7188E
EE_ReadNext | * | * | * | * | * | *

  • Description:

    • Read one byte data from next EEPROM address.
  • Declaration:

    • int EE_ReadNext(int Block);
  • Input Parameter:

    • Block:
      • 0 to 7(total 8 blocks). After call EE_RandomRead, eeprom internal pointer will point to the next address(After 255 is 0). Next time call EE_ReadNext need not send the address to EEPROM, just use the internal pointer. If use tha same block, EE_ReadNext read the next address of the same block. But if use different bolck, it also read the next address but from different block. If current address is 255, then the next address is 0, next time user must consider to use the same block or use block+1 to read data from next block.
  • Return Value:

    • On success return the value on EEPROM(0 to 255).
    On fail return Error code.BlockError(-10) or AddrError(-9) or (-101 for read error).
    ( Refer to const.htm)
  • Demo program:

    • None.
[Index] [Back]
[MiniOS7 Library reference : EE_ReadNext] Ver.1.3.1
Final update date:[03/01/2001], By: Tsai,Kun-Ting.