<?xml version="1.0" encoding="UTF-8"?>
<!--************************************************************************-->
<!--* Copyright (C) 2005-2007 Nicolas Hadacek <hadacek@kde.org>            *-->
<!--*                                                                      *-->
<!--* This program is free software; you can redistribute it and/or modify *-->
<!--* it under the terms of the GNU General Public License as published by *-->
<!--* the Free Software Foundation; either version 2 of the License, or    *-->
<!--* (at your option) any later version.                                  *-->
<!--************************************************************************-->
<device name="18C858" document="010263" status="NR" alternative="18F8585" memory_technology="EPROM" architecture="18C" id="0x00E0" >

<!--* Checksums ************************************************************-->
  <checksums>
    <checksum protected="Off" bchecksum="0x8145" cchecksum="0x809B" />
    <checksum protected="All" bchecksum="0x0058" cchecksum="0x0062" />
  </checksums>

<!--* Operating characteristics ********************************************-->
  <frequency_range name="industrial" special="low_power" >
    <frequency start="0" end="6"  vdd_min="2.5" vdd_max="5.5" />
    <frequency start="6" end="40" vdd_min="2.5" vdd_max="5.5" vdd_min_end="4.2" />
  </frequency_range>
  <frequency_range name="extended"   >
    <frequency start="0" end="40" vdd_min="4.2" vdd_max="5.5" />
  </frequency_range>

  <voltages name="vpp"      min="12.75" max="13.25" nominal="13" />
  <voltages name="vdd_prog" min="4.75"  max="5.25"  nominal="5"  />

<!--* Memory ***************************************************************-->
  <memory name="code"   start="0x000000" end="0x007FFF" />
  <memory name="user_ids"  start="0x200000" end="0x200007" rmask="0x0F" />
  <memory name="device_id" start="0x3FFFFE" end="0x3FFFFF" />
  <memory name="config"    start="0x300000" end="0x300007" />

<!--* Configuration bits ***************************************************-->
  <config offset="0x0" name="CONFIG0" wmask="0xFF" bvalue="0xFF" >
    <mask name="CP" value="0xFF" >
      <value value="0x00" name="All" cname="_CP_ON"  />
      <value value="0xFF" name="Off" cname="_CP_OFF" />
      <value value="default" name="invalid" />
    </mask>
  </config>

  <config offset="0x1" name="CONFIG1" wmask="0xFF" bvalue="0x27" >
    <mask name="FOSC"   value="0x07" >
      <value value="0x00" name="LP"           cname="_LP_OSC"    />
      <value value="0x01" name="XT"           cname="_XT_OSC"    />
      <value value="0x02" name="HS"           cname="_HS_OSC"    />
      <value value="0x03" name="EXTRC_CLKOUT" cname="_RC_OSC"    />
      <value value="0x04" name="EC_CLKOUT"    cname="_EC_OSC"    />
      <value value="0x05" name="EC_IO"        cname="_ECIO_OSC"  />
      <value value="0x06" name="H4"           cname="_HSPLL_OSC" />
      <value value="0x07" name="EXTRC_IO"     cname="_RCIO_OSC"  />
    </mask>
    <mask name="OSCSEN" value="0x20" >
      <value value="0x00" name="On"  cname="_OSCS_ON"  />
      <value value="0x20" name="Off" cname="_OSCS_OFF" />
    </mask>
  </config>

  <config offset="0x2" name="CONFIG2" wmask="0xFF" bvalue="0x0F" >
    <mask name="PWRTE" value="0x01" >
      <value value="0x00" name="On"  cname="_PWRT_ON"  />
      <value value="0x01" name="Off" cname="_PWRT_OFF" />
    </mask>
    <mask name="BODEN" value="0x02" >
      <value value="0x00" name="Off" cname="_BOR_OFF" />
      <value value="0x02" name="On"  cname="_BOR_ON"  />
    </mask>
    <mask name="BORV"  value="0x0C" >
      <value value="0x00" name="4.5" cname="_BORV_45" />
      <value value="0x04" name="4.2" cname="_BORV_42" />
      <value value="0x08" name="2.7" cname="_BORV_27" />
      <value value="0x0C" name="2.5" cname="_BORV_25" />
    </mask>
  </config>

  <config offset="0x3" name="CONFIG3" wmask="0xFF" bvalue="0x0F" >
    <mask name="WDT"   value="0x01" >
      <value value="0x00" name="Off" cname="_WDT_OFF" />
      <value value="0x01" name="On"  cname="_WDT_ON"  />
    </mask>
    <mask name="WDTPS" value="0x0E" >
      <value value="0x00" name="1:1"   cname="_WDTPS_1"   />
      <value value="0x02" name="1:2"   cname="_WDTPS_2"   />
      <value value="0x04" name="1:4"   cname="_WDTPS_4"   />
      <value value="0x06" name="1:8"   cname="_WDTPS_8"   />
      <value value="0x08" name="1:16"  cname="_WDTPS_16"  />
      <value value="0x0A" name="1:32"  cname="_WDTPS_32"  />
      <value value="0x0C" name="1:64"  cname="_WDTPS_64"  />
      <value value="0x0E" name="1:128" cname="_WDTPS_128" />
    </mask>
  </config>

  <config offset="0x4" name="CONFIG4" wmask="0xFF" bvalue="0x00" />

  <config offset="0x5" name="CONFIG5" wmask="0xFF" bvalue="0x00" />

  <config offset="0x6" name="CONFIG6" wmask="0xFF" bvalue="0x01" >
    <mask name="STVREN" value="0x01" >
      <value value="0x00" name="Off" cname="_STVR_OFF" />
      <value value="0x01" name="On"  cname="_STVR_ON"  />
    </mask>
  </config>

  <config offset="0x7" name="CONFIG7" wmask="0xFF" bvalue="0x00" />

<!--* Packages *************************************************************-->
  <package types="tqfp" nb_pins="80" >
    <pin index="1"  name="" />
    <pin index="2"  name="" />
    <pin index="3"  name="" />
    <pin index="4"  name="" />
    <pin index="5"  name="" />
    <pin index="6"  name="" />
    <pin index="7"  name="" />
    <pin index="8"  name="" />
    <pin index="9"  name="" />
    <pin index="10" name="" />
    <pin index="11" name="" />
    <pin index="12" name="" />
    <pin index="13" name="" />
    <pin index="14" name="" />
    <pin index="15" name="" />
    <pin index="16" name="" />
    <pin index="17" name="" />
    <pin index="18" name="" />
    <pin index="19" name="" />
    <pin index="20" name="" />
    <pin index="21" name="" />
    <pin index="22" name="" />
    <pin index="23" name="" />
    <pin index="24" name="" />
    <pin index="25" name="" />
    <pin index="26" name="" />
    <pin index="27" name="" />
    <pin index="28" name="" />
    <pin index="29" name="" />
    <pin index="30" name="" />
    <pin index="31" name="" />
    <pin index="32" name="" />
    <pin index="33" name="" />
    <pin index="34" name="" />
    <pin index="35" name="" />
    <pin index="36" name="" />
    <pin index="37" name="" />
    <pin index="38" name="" />
    <pin index="39" name="" />
    <pin index="40" name="" />
    <pin index="41" name="" />
    <pin index="42" name="" />
    <pin index="43" name="" />
    <pin index="44" name="" />
    <pin index="45" name="" />
    <pin index="46" name="" />
    <pin index="47" name="" />
    <pin index="48" name="" />
    <pin index="49" name="" />
    <pin index="50" name="" />
    <pin index="51" name="" />
    <pin index="52" name="" />
    <pin index="53" name="" />
    <pin index="54" name="" />
    <pin index="55" name="" />
    <pin index="56" name="" />
    <pin index="57" name="" />
    <pin index="58" name="" />
    <pin index="59" name="" />
    <pin index="60" name="" />
    <pin index="61" name="" />
    <pin index="62" name="" />
    <pin index="63" name="" />
    <pin index="64" name="" />
    <pin index="65" name="" />
    <pin index="66" name="" />
    <pin index="67" name="" />
    <pin index="68" name="" />
    <pin index="69" name="" />
    <pin index="70" name="" />
    <pin index="71" name="" />
    <pin index="72" name="" />
    <pin index="73" name="" />
    <pin index="74" name="" />
    <pin index="75" name="" />
    <pin index="76" name="" />
    <pin index="77" name="" />
    <pin index="78" name="" />
    <pin index="79" name="" />
    <pin index="80" name="" />
  </package>

  <package types="plcc" nb_pins="84" >
    <pin index="1"  name="" />
    <pin index="2"  name="" />
    <pin index="3"  name="" />
    <pin index="4"  name="" />
    <pin index="5"  name="" />
    <pin index="6"  name="" />
    <pin index="7"  name="" />
    <pin index="8"  name="" />
    <pin index="9"  name="" />
    <pin index="10" name="" />
    <pin index="11" name="" />
    <pin index="12" name="" />
    <pin index="13" name="" />
    <pin index="14" name="" />
    <pin index="15" name="" />
    <pin index="16" name="" />
    <pin index="17" name="" />
    <pin index="18" name="" />
    <pin index="19" name="" />
    <pin index="20" name="" />
    <pin index="21" name="" />
    <pin index="22" name="" />
    <pin index="23" name="" />
    <pin index="24" name="" />
    <pin index="25" name="" />
    <pin index="26" name="" />
    <pin index="27" name="" />
    <pin index="28" name="" />
    <pin index="29" name="" />
    <pin index="30" name="" />
    <pin index="31" name="" />
    <pin index="32" name="" />
    <pin index="33" name="" />
    <pin index="34" name="" />
    <pin index="35" name="" />
    <pin index="36" name="" />
    <pin index="37" name="" />
    <pin index="38" name="" />
    <pin index="39" name="" />
    <pin index="40" name="" />
    <pin index="41" name="" />
    <pin index="42" name="" />
    <pin index="43" name="" />
    <pin index="44" name="" />
    <pin index="45" name="" />
    <pin index="46" name="" />
    <pin index="47" name="" />
    <pin index="48" name="" />
    <pin index="49" name="" />
    <pin index="50" name="" />
    <pin index="51" name="" />
    <pin index="52" name="" />
    <pin index="53" name="" />
    <pin index="54" name="" />
    <pin index="55" name="" />
    <pin index="56" name="" />
    <pin index="57" name="" />
    <pin index="58" name="" />
    <pin index="59" name="" />
    <pin index="60" name="" />
    <pin index="61" name="" />
    <pin index="62" name="" />
    <pin index="63" name="" />
    <pin index="64" name="" />
    <pin index="65" name="" />
    <pin index="66" name="" />
    <pin index="67" name="" />
    <pin index="68" name="" />
    <pin index="69" name="" />
    <pin index="70" name="" />
    <pin index="71" name="" />
    <pin index="72" name="" />
    <pin index="73" name="" />
    <pin index="74" name="" />
    <pin index="75" name="" />
    <pin index="76" name="" />
    <pin index="77" name="" />
    <pin index="78" name="" />
    <pin index="79" name="" />
    <pin index="80" name="" />
    <pin index="81" name="" />
    <pin index="82" name="" />
    <pin index="83" name="" />
    <pin index="84" name="" />
  </package>

</device>
