home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / robotics / 2661 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  9.6 KB

  1. Xref: sparky comp.robotics:2661 sci.electronics:20886
  2. Newsgroups: comp.robotics,sci.electronics
  3. Path: sparky!uunet!timbuk.cray.com!hemlock.cray.com!kilian
  4. From: kilian@cray.com (Alan Kilian)
  5. Subject: HC16 primer Rev 0.2
  6. Message-ID: <1992Dec16.150732.11100@hemlock.cray.com>
  7. Lines: 230
  8. Nntp-Posting-Host: gopher
  9. Organization: Cray Research, Inc.
  10. Date: 16 Dec 92 15:07:32 CST
  11.  
  12. Here's my attempt at a Motorola MC68HC16 primer.
  13. More versions will be posted as I get time to fill things out.
  14. If you can fill out a section please Email it to me.
  15.  
  16. This is Revision 0.2
  17.  
  18. 0) Revision information:
  19.    0.1: Initial writing. Sections 1,2 and 3
  20.    0.2: Added section 0,5,6,7 and 8 and the reading list
  21.  
  22. 1) What are the part numbers and variants?
  23.       XC16Z1CFC16     16.78 mHz 132 pin plastic surface mount 32 per tray.
  24.   SPAKXC16Z1CFC16     16.78 mHz 132 pin plastic surface mount  2 per tray.
  25.       XC16Z1CFC20    20.00 mHz 132 pin plastic surface mount 32 per tray.
  26.   SPAKXC16Z1CFC20     20.00 mHz 132 pin plastic surface mount  2 per tray.
  27.       XC16Z1CFC25     25.00 mHz 132 pin plastic surface mount 32 per tray.
  28.   SPAKXC16Z1CFC25     25.00 mHz 132 pin plastic surface mount  2 per tray.
  29.   
  30.       XC16Z1CFD16     16.78 mHz 132 pin molded carrier ring   10 per tube.
  31.       XC16Z1CFD20     20.00 mHz 132 pin molded carrier ring   10 per tube.
  32.       XC16Z1CFD25     25.00 mHz 132 pin molded carrier ring   10 per tube.
  33.   
  34.       XC16Z1CFV16     16.78 mHz 144 pin plastic surface mount 44 per tray.
  35.   SPAKXC16Z1CFV16     16.78 mHz 144 pin plastic surface mount  2 per tray.
  36.       XC16Z1CFV20    20.00 mHz 144 pin plastic surface mount 44 per tray.
  37.   SPAKXC16Z1CFV20     20.00 mHz 144 pin plastic surface mount  2 per tray.
  38.       XC16Z1CFV25     25.00 mHz 144 pin plastic surface mount 44 per tray.
  39.   SPAKXC16Z1CFV25     25.00 mHz 144 pin plastic surface mount  2 per tray.
  40.   
  41.       XC16Z1CFM16     16.78 mHz 144 pin molded carrier ring   13 per tube.
  42.       XC16Z1CFM20     20.00 mHz 144 pin molded carrier ring   13 per tube.
  43.       XC16Z1CFM25     25.00 mHz 144 pin molded carrier ring   13 per tube.
  44.   
  45.   The XC means that it is still in the eXperimental production run.
  46.   They still have some strange actions that will not be in the production
  47.   parts. From the errata sheets I have there aren't any show stoppers.
  48.   
  49.   One XC16Z1CFC16 will run about $22.00 and take 16 weeks to get to you.
  50.   Although I don't believe the 16 week lead time.
  51.  
  52. 2) What is it?
  53.    The MC68HC16Z1 is a high-speed 16-bit control unit that is upwardly code 
  54.    compatible with MC68HC11 controllers. 
  55.  
  56.    M68HC16 controllers are built up from standard modules that interface 
  57.    through a common internal bus.
  58.  
  59.    The 'HC16Z1 incorporates the following modules:
  60.    a true 16-bit CPU (CPU16),
  61.    a system integration module (SIM),
  62.    an 8/10-bit analog-to-digital convertor (ADC),
  63.    a queued serial module (QSM),
  64.    a general purpose timer (GPT),
  65.    and a 1024 byte standby ram (SRAM).
  66.    These modules are interconnected by the intermodule bus (IMB).
  67.  
  68. 3) Features:
  69.    CPU16:
  70.     16-bit architecture
  71.     Full set of 16-bit instructions
  72.     Three 16-bit index registers
  73.     Two 16-bit accumulators
  74.     Control-oriented digital signal processing capability
  75.     1 Megabyte of program memory and 1 Megabyte of data memory
  76.         This means you have 20 bits of effective address which
  77.         consists of a 16 bit page address and a 4 bit extension. 
  78.     High-level language support
  79.         Like what?
  80.     Fast interrupt response time
  81.         Somewhere around 25 clocks. (1.5 microseconds @16.78 mHz)
  82.            I can't get the numbers exactly from the million pages of manuals.
  83.     Background debugging mode
  84.         Wow! This is cool. More later.
  85.     Fully static operation. 
  86.         This means you can use whatever clock you like. All the way
  87.         down to zero. And you can vary the clock during execution.
  88.    SIM:
  89.     External bus support.
  90.         What a surprise
  91.     Programmable chip select outputs.
  92.         Cool way to map external devices into your data space.
  93.     System protection logic
  94.         Who knows what this is.
  95.     Watchdog timer, Clock monitor and bus monitor.
  96.         I never use these types of things.
  97.     Two 8-bit dual function ports.
  98.     One 7-bit dual function port.
  99.     Phase-Locked-Loop (PLL) Clock system.
  100.         You don't need a 16.78 mHz crystal. Just use a 32,768 Hz crystal.
  101.         (Yup, 32.768 kHz. Apparently its a watch crystal.)
  102.    8/10-bit A/D:
  103.     Select 8 or 10 bit precision.
  104.     Eight channels, Eight result registers.
  105.         The HC11 has 4 result registers.
  106.     Eight automated modes.
  107.         One bit for each of three modes:
  108.         SCAN: continuous or single conversion
  109.         MULT: Multiple or single channel
  110.         S8CM: 8-conversions or 4-conversions
  111.         You can set as many bits as you like. 2^3 = 8 modes.
  112.     Three result alignment modes
  113.         Unsigned Right-justified format
  114.         Unsigned Left-justified format
  115.         Signed Left-justified format
  116.     One 8-bit digital input port.
  117.         If you don't use it as an analog input port.
  118.    QSM:
  119.     Queued serial peripheral interface
  120.         Like the HC11's SPI but has a 32 byte input and output queue
  121.         so you don't have to fiddle with each byte.
  122.     One 8-bit Dual function port
  123.         If you don't use it as a serial port.
  124.    GPT:
  125.     Two 16-bit free-running counters with prescaler
  126.     Three input capture channels
  127.     Four output compare channels
  128.     One input capture/output compare channel
  129.     One pulse accumulator channel
  130.     Two pulse width modulation outputs (PWM)
  131.     One 8-bit Dual function port
  132.     Two optional discrete inputs
  133.     Optional external clock input.
  134.    SRAM:
  135.     1024 byte static ram
  136.         And its only 2 clocks away!!!
  137.     External standby voltage supply input
  138.         For a lithium battery or Whopping-big capacitor.
  139.  
  140. 4) How does it compare to the HC11?
  141.  
  142. 5) How does the Background Debugging Mode (BDM) work?
  143.    This is great. It's my favorite feature so far. Here's what it does:
  144.    It does three things: Deterministic opcode tracking, breakpoint exceptions
  145.    and background debugging.
  146.  
  147.    1) Deterministic opcode tracking:
  148.     The CPU16 has two multiplexed outputs, IPIPE0 and IPIPE1 that enable
  149.     external hardware to monitor the instruction pipeline during normal
  150.     program execution. The signals can be demultiplexed into six
  151.     pipeline state signals that allow a state analyzer to synchronize with
  152.     instruction stream activity. You are now wondering how we get 6 states
  153.     out of two signals aren't you? Well they are time multiplexed.
  154.     The states are as follows:
  155.         Phase    IPIPE1    IPIPE0        State signal name
  156.           1           0        0        Start & Fetch
  157.           1           0        1        Fetch
  158.           1           1        0        Start
  159.           1           1        1        NULL
  160.           2           0        0        Invalid
  161.           2           0        1        Advance
  162.           2           1        0        Exception
  163.           2           1        1        NULL
  164.  
  165.    2) Breakpoint exceptions:
  166.     Breakpoints are set by internal assertion of the IMB *BKPNT signal
  167.     or assertion of the *BKPNT pin. The CPU16 supports breakpoints on
  168.     any memory access. So you can design a state analyzer that watches
  169.     for opcodes or addresses and asserts the *BKPNT signal.
  170.  
  171.    3) Background debugging mode (BDM):
  172.     There are three lines DSCLCK, DSO and DSI
  173.     DSCLCK - Development Serial CLoCK
  174.     DSO    - Development Serial Output
  175.     DSI    - Development Serial Input
  176.     These three lines implement a cool little synchronous serial interface.
  177.     You send serial commands and data to the CPU16 while it sends you
  178.     serial status and data.
  179.     The commands are:
  180.     - Read Registers from mask    Read CPU16 registers
  181.     - Write Registers from mask    Write CPU16 registers
  182.     - Read MAC Registers        Read the Multiply and ACcumulate regs
  183.     - Write MAC Registers        Write the Multiply and ACcumulate regs
  184.     - Read PC and SP        Read Program Counter and Stack Pointer
  185.     - Write PC and SP        Write Program Counter and Stack Pointer
  186.     - Read Data memory        Just what it says
  187.     - Write Data memory        Just what it says
  188.     - Read program memory        Just what it says
  189.     - Write program memory        Just what it says
  190.     - Execute from current PK:PC    Continue executing
  191.     - Null                Duh.
  192.  
  193.     So you could boot this thing up with BDM enabled,
  194.     download a program into the SRAM and junp to the beginning of the
  195.     program. Cool huh?
  196.  
  197. 6) Tell us about the Two 16-bit free-running counters.
  198.    One counter is just like the HC11 counter for comapre and capture
  199.    functions. The second counter is used for the PWM function.
  200.  
  201. 7) What about power-down modes?
  202.    LPSTOP mode:
  203.     The CPU16 initiates a stop. Controller modules are deactivated,
  204.     The system clock is stopped. The processor waits until an interrupt of 
  205.     the proper pripority is asserted and then everything is started up.
  206.    WAI mode:
  207.     The CPU16 is stopped but other modules continue to run. The timer 
  208.     subsystem can wake up the CPU16 for example.
  209.    Current usage:
  210.     Run mode 110 milliAmps MAX
  211.     WAI        5 milliAmps MAX
  212.     LPSTOP   350 microAmps MAX
  213.  
  214. 8) How do those PWM outputs work?
  215.    You select a frequency from 32.8 kHz to 4.0 Hz and them you can select
  216.    the duty cycle from 0 to 100% by writing an 8-bit register.
  217.    There are two separate PEM outputs and two 8-bit registers for the duty
  218.    cycle. They share the same frequency register.
  219.  
  220. Reading list: These are required reading if you want to work with this thing.
  221.  
  222.   CPU16RM/AD Revision 1        The 16 bit CPU module
  223.   MC68HC16Z1 Users manual
  224.   ADCRM/AD            Analog to digital input module
  225.   GPTRM/AD            The General purpose timer module
  226.   QSMRM/AD            Queued serial module
  227.   MC68331UM/AD            The 68HC331 manual for SIM and SRAM information
  228.   MC68HC16Z1TS/D Revision 3    The 'Z1 technical summary
  229.   PC68HC16Z1 Errata sheet
  230.   SIMRM/AD (Not available yet)    The System Integration Module
  231.  
  232.   You can get these from the Motorola literature distribution:
  233.   1-602-994-6561
  234.   
  235.                                   -Alan Kilian
  236.  
  237.  
  238. -- 
  239.  -Alan Kilian           kilian@cray.com 612.683.5499 (Work) 612.721.3990 (Home)
  240.   "Our friend Dirac has his own philosophy. It is:"
  241.   "There is no God and Dirac is His prophet" - Some Physicist
  242.