HOME

TheInfoList



OR:

The 9S08 (68HCS08 or S08 for short) is a 8-bit microcontroller (µC) family originally produced by
Motorola Motorola, Inc. () was an American multinational telecommunications company based in Schaumburg, Illinois, United States. After having lost $4.3 billion from 2007 to 2009, the company split into two independent public companies, Motorol ...
, later by
Freescale Semiconductor Freescale Semiconductor, Inc. was an American semiconductor manufacturer. It was created by the divestiture of the Semiconductor Products Sector of Motorola in 2004. Freescale focused their integrated circuit products on the automotive, embe ...
, and currently by NXP, descended from the
Motorola 6800 The 6800 ("''sixty-eight hundred''") is an 8-bit microprocessor designed and first manufactured by Motorola in 1974. The MC6800 microprocessor was part of the M6800 Microcomputer System (latter dubbed ''68xx'') that also included serial and para ...
microprocessor. It is a CISC microcontroller. A slightly extended variant of the
68HC08 The 68HC08 (HC08 in short) is a broad family of 8-bit microcontrollers originally from Motorola Semiconductor, later from Freescale Semiconductor. HC08's are fully code-compatible with their predecessors, the Motorola 68HC05. Like all Motorola pr ...
, it shares upward compatibility with the aging 68HC05 microcontrollers, and is found in almost any type of embedded systems. The larger members offer up to 128 KiB of
flash Flash, flashes, or FLASH may refer to: Arts, entertainment, and media Fictional aliases * Flash (DC Comics character), several DC Comics superheroes with super speed: ** Flash (Barry Allen) ** Flash (Jay Garrick) ** Wally West, the first Kid F ...
, and 8 KiB of
RAM Ram, ram, or RAM may refer to: Animals * A male sheep * Ram cichlid, a freshwater tropical fish People * Ram (given name) * Ram (surname) * Ram (director) (Ramsubramaniam), an Indian Tamil film director * RAM (musician) (born 1974), Dutch * ...
via a simple MMU which allows bank-switching 16 KiB of the address space and an address/data register pair which allows data fetches from any address. The paging scheme used allows for a theoretical maximum of 4MB of flash. MMU equipped variants offer two extra CPU instructions, CALL and RTC, which are used instead of JSR and RTS respectively when dealing with subroutines placed in paged memory, allowing direct page-to-page subroutine calls. In a single atomic operation, CALL saves and RTC restores not only the PC but also one extra address byte, the PPAGE (program page) byte. Because of this extra byte, and to also keep the stack balanced, a subroutine ending with RTC must always be called with CALL, even if it resides in the same memory page. Internally, the 9S08 instruction set is upward compatible with the 6805, with the addition of stack indexed
addressing mode Addressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how the machine language instructions i ...
s. (Instructions using the SP
register Register or registration may refer to: Arts entertainment, and media Music * Register (music), the relative "height" or range of a note, melody, part, instrument, etc. * ''Register'', a 2017 album by Travis Miller * Registration (organ), th ...
have opcodes prefixed with the byte 0x9E). It has a single eight-bit accumulator, A, one sixteen-bit
index register An index register in a computer's CPU is a processor register (or an assigned memory location) used for pointing to operand addresses during the run of a program. It is useful for stepping through strings and arrays. It can also be used for hol ...
, HX (whose lower half, X, is used in isolation by 6805-compatible instructions), a
condition code register A status register, flag register, or condition code register (CCR) is a collection of status flag bits for a processor. Examples of such registers include FLAGS register in the x86 architecture, flags in the program status word (PSW) register in t ...
, a
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two mo ...
stack pointer In computer science, a call stack is a stack data structure that stores information about the active subroutines of a computer program. This kind of stack is also known as an execution stack, program stack, control stack, run-time stack, or mach ...
, and a program counter. For compatibility with the 6805 which does not have an H register, the most significant byte of the HX register, H, is cleared during reset, and H is the only register not stacked automatically when entering any ISR (
Interrupt Service Routine In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softwar ...
). Unlike the 6805, the stack can be placed anywhere in memory using appropriate instructions. The standard method of programming or debugging the 9S08 family is via a standard 6-pin BDM interface (only one pin is used for communication with the microcontroller). A wide variety of peripherals is available for different members and/or packages. SCI, SPI, 8/10/12-bit A/D, (C)PWM, Input Captures, and Output Compares are common with most members, but no external bus is available. Some members come with a built-in CAN controller.


Compiler support

The S08 is partly supported (e.g., no MMU support) by the free C compiler SDCC and fully by
CodeWarrior CodeWarrior is an integrated development environment (IDE) published by NXP Semiconductors for editing, compiling, and debugging software for several microcontrollers and microprocessors (Freescale ColdFire, ColdFire+, Kinetis, Qorivva, PX, Frees ...
.


References


External links


HCS08/9S08 Processor Families



Example assembly language code written for ASM8
{{Motorola microcontrollers Motorola microcontrollers Freescale Semiconductor microcontrollers NXP Semiconductors microcontrollers