RS08KA2 PROMO Freescale Semiconductor, RS08KA2 PROMO Datasheet

DEMO KIT, SILICON BUNDLE, RS08KA2

RS08KA2 PROMO

Manufacturer Part Number
RS08KA2 PROMO
Description
DEMO KIT, SILICON BUNDLE, RS08KA2
Manufacturer
Freescale Semiconductor
Datasheet

Specifications of RS08KA2 PROMO

Kit Contents
DEMO9RS08KA2 Board, USB Cable, Quick Start Guide, User Manual, Packing List
Svhc
No SVHC (15-Dec-2010)
Development Tool Type
Demonstration Kit
Kit Features
RS08KA2 Microcontroller,
Silicon Manufacturer
Freescale
Core Architecture
RS08
Core Sub-architecture
RS08
Silicon Core Number
MC9RS08
Silicon Family Name
RS08KA
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Freescale Semiconductor
Application Note
Getting Started with RS08
by: Vincent Ko
This application note is an introduction to the RS08
platform, an ultra low-cost 8-bit MCU core, from
Freescale Semiconductor.
Section 1 provides information for the user to get started
with RS08 and section 2 includes application discussions
to demonstrate techniques and concepts, together with
working examples.
1
This section covers the RS08 architecture, programming
model, and instruction set to help the user to gain a good
understanding on the platform. Where necessary, cross
references are provided to the popular Freescale HC08
and S08 platforms. In most cases, the MC9RS08KA2
device is used in examples to illustrate concepts.
© Freescale Semiconductor, Inc., 2006. All rights reserved.
This document contains information on a new product under development. Freescale
reserves the right to change or discontinue this product without notice.
Systems Engineering
Microcontroller Division
Introduction to RS08
1
2
Appendix A
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
2.1
2.2
2.3
Introduction to RS08 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Emulated ADC Application Example . . . . . . . . . . . . . . . 22
Program Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
RS08 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 2
RS08 Instruction Set . . . . . . . . . . . . . . . . . . . . . . . . 6
Paging Memory Scheme . . . . . . . . . . . . . . . . . . . . 15
MCU Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Subroutine Call . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Measurement Result . . . . . . . . . . . . . . . . . . . . . . . 28
Document Number: AN3266
Contents
Rev. 1, 5/2006

Related parts for RS08KA2 PROMO

RS08KA2 PROMO Summary of contents

Page 1

... S08 platforms. In most cases, the MC9RS08KA2 device is used in examples to illustrate concepts. This document contains information on a new product under development. Freescale reserves the right to change or discontinue this product without notice. © Freescale Semiconductor, Inc., 2006. All rights reserved. Document Number: AN3266 Rev. 1, 5/2006 Contents 1 Introduction to RS08 ...

Page 2

... BCS and BEQ. RS08 CPU registers ACCUMULATOR PROGRAM COUNTER 13 0 SHADOW PROGRAM COUNTER CONDITION CODE REGISTER Z C Figure 1-1. RS08 CPU Registers Getting Started with RS08, Rev. 1 Figure 1-1 shows the A PC SPC CCR CARRY ZERO Freescale Semiconductor ...

Page 3

... Registers D[X] and X together perform indirect data access. The register X contains the address which is used when register D[X] is accessed. registers are not part of the CPU internal registers, but they are integrated seamlessly with the RS08 generic instruction set to form a pseudo instruction set. Freescale Semiconductor 7 0 INDIRECT DATA REGISTER D[X] (location $000E) ...

Page 4

... Table 1-1. RS08 Addressing Modes Addressing Mode Example CLRA, INCA, SHA, RTS LDA $20, AND $20 BRA, BCS, BEQ LDA #9 INC <$0D CLR <$1D JMP, JSR Getting Started with RS08, Rev. 1 Register X can specify any location between $0000–$00FF Table 1-1 summarizes the generic Freescale Semiconductor ...

Page 5

... X related operations are involved, user can use the same HC08/S08 coding syntax for RS08 programming. During compilation the assembler will convert the pseudo RS08 instructions to equivalent generic RS08 instructions. This operation is transparent to the user. Freescale Semiconductor Getting Started with RS08, Rev. 1 Introduction to RS08 ...

Page 6

... HC08/S08 core were removed from the RS08 core. Code condition register (CCR) contains two status flags, Z-bit and C-bit, only conditional branch instructions involving these bits were included. Table 1-2 summarizes the difference between RS08 instruction set and S08 instruction set. 6 NOTE Getting Started with RS08, Rev. 1 Freescale Semiconductor ...

Page 7

... Accumulator DEC opr8 DEC opr4 Decrement DECA DECX DEC ,X Divide INC opr8 INC opr4 Increment INCA INCX INC ,X Freescale Semiconductor RS08 S08 ADC #opr8 ADC opr8 ADC opr16 ADC opr8,X 1 ADC opr16 ADC ,X ADC opr8,SP ADC opr16,SP ADD #opr8 ADD opr8 ...

Page 8

... X ← –(X) = $00 – (X) A ← (A) – (M) – (C) A ← (A) – (X) – ( ← (A) – (M) A ← (A) – ( ← (A) & (M) A ← (A) & ( ← ← ← ← ← (M)= $FF – (M) A ← (A) = $FF – (M) X ← (X) = $FF – (M) A ← (A ⊕ ← (A ⊕ Freescale Semiconductor ...

Page 9

... BHS rel as BCC) Branch if IRQ Pin High Branch if IRQ Pin Low Branch if Less Than or Equal To (Signed Operands) Branch if Lower BLO rel (Same as BCS) Branch if Lower or Same Freescale Semiconductor RS08 S08 LSR opr8 LSRA LSRX LSR opr8,X LSR ,X LSR opr8,SP NSA ORA #opr8 ...

Page 10

... PC ← (PC) + $0004 + rel ? (A) – (M) = $00 PC ← (PC) + $0003 + rel ? (A) – (M) = $00 PC ← (PC) + $0003 + rel ? (A) – (X) = $00 A ← (A) – $0001 or M ← (M) – $ ← (X) – $0001 IX1 NZX DBNZX, DBNZ ,X PC ← (PC) + $0002 + rel if (result) ≠ 0 for DBNZA PC ← Jump Address Freescale Semiconductor ...

Page 11

... Memory TST opr8 Test for Negative or Zero TSTA TSTX Data Movement Operations: LDA #opr8 LDA opr8 Load Accumulator from Memory LDA opr5 LDA ,X Freescale Semiconductor RS08 S08 JSR opr8 JSR opr16 JSR opr16,X JSR opr8,X JSR ,X RTS BIT #opr8 BIT opr8 ...

Page 12

... M ← (A) (M:M + $0001) ← (H:X) M ← (X) CCR ← (A) X ← (A) A ← (CCR) H:X ← (SP) + $0001 A ← (X) (SP) ← (H:X) – $0001 Enter Background Debug Mode C ← ← 0 None Push (A); SP ← (SP) – $0001 Push (H); SP ← (SP) – $0001 Freescale Semiconductor ...

Page 13

... Given the limited addressable space for these instructions, careful planning to allocate the most frequently used variables to be located within the tiny and short addressable area is recommended. for the RS08 platform. Freescale Semiconductor RS08 S08 PSHX ...

Page 14

... STA <$00 CLR <$1F CLR <$00 ADD <$0F ADD <$00 SUB <$0F SUB <$00 INC <$0F INC <$00 DEC <$0F DEC <$00 summarizes all of the pseudo Description Bytes Cycles ← ( ← ( ← (A) & ( ← (A) & ( ← ← ← ← Freescale Semiconductor ...

Page 15

... The entire accessible memory space for RS08 is 16K-bytes, and divided into 256 pages of 64-byte memory. Programming the PAGESEL register ($001F) defines the page to be accessed through the paging window. Figure 1-4 illustrates the paging memory scheme. Freescale Semiconductor Emulation Description CLR <$0E CLR <$0F ...

Page 16

... The operand indicates the user defined location to start user program execution. ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; Reset Vector ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% org $3FFC Security: dc.b $FF jmp main 16 NOTE PAGESEL Register $00 $01 PAGE 0 PAGE 1 Figure 1-4. RS08 Paging Scheme ; SECD=1 is unsecured, SECD=0 is secured Getting Started with RS08, Rev. 1 $FF PAGE 255 Freescale Semiconductor ...

Page 17

... Please refer to the specific device data sheet for more details. If the STOPE bit is not set when the CPU executes a STOP instruction, the MCU will not enter stop mode and an illegal opcode reset is forced. Freescale Semiconductor NOTE Getting Started with RS08, Rev. 1 ...

Page 18

... Update stack pointer ; Swap SPC low byte ; Pull low byte ; Resume A and SPCL content ; Update stack pointer ; Swap SPC high byte ; Pull high byte ; Resume A and SPCH content ; Save stack pointer ; Stack pointer location Getting Started with RS08, Rev. 1 Freescale Semiconductor ...

Page 19

... Similar to the HC08/S08 platform, in RS08 each interrupt source is associated with a corresponding interrupt flag and an interrupt enable bit. The wait/stop wakeup capability of an interrupt source can only Freescale Semiconductor ; Stack SPC ; Multi-level subroutine call ...

Page 20

... SIP1_RTI, SIP1, RTI_ISR Priority5: brset SIP1_LVD, SIP1, LVD_ISR bra InfLoop MTIM_ISR: ;... <ISR coding> ... 20 KBI ACMP RTI Getting Started with RS08, Rev. 1 Lowest LVD Table 1-5, the ;Bump COP ;5 bus cycles ;5 bus cycles ;5 bus cycles ;5 bus cycles ;5 bus cycles Freescale Semiconductor ...

Page 21

... MCU stop recovery time that allows the system clock and internal regulator to wakeup from their standby mode. The stop recovery time varies among product families, it depends on the clock module and internal regulator technology used. Freescale Semiconductor Interrupt Latency (µs) ...

Page 22

... Maximum timer overflow is assumed, then overflow period becomes 255 times 4µs, i.e. 1.02ms. 22 VDD On-chip R Comparator 4k7 + – C 47nF MCU Boundary Figure 2-5. Emulated ADC Schematic Ch arg eUpTime TimerResolution = --------------------------------------- - n 2 – 1 Getting Started with RS08, Rev. 1 ADC In Freescale Semiconductor Eqn. -1 ...

Page 23

... Equation 2. The step size for a linear 8-bit ADC is given as: A linear ADC is expected to quantize the input voltage at step boundary starting from step/2 input voltage as shown in Figure Freescale Semiconductor t ⎛ ⎞ – ------- - RC ⎜ ...

Page 24

... ADC Input (V) Timer Count (Equation 0.09 1 0.18 2 0.26 3 0.35 4 0.43 5 and so on... 4.95 253 4.95 254 4.95 255 Getting Started with RS08, Rev. 1 ⎞ Step ≥ ---------- - ⎠ 2 ⎞ Step < ---------- - ⎠ 2 Table 2-7. Linear ADC Code (Equation 253 253 253 Freescale Semiconductor Eqn. -5 ...

Page 25

... ACMP1SC bset ACMP1SC_ACF, ACMP1SC wait mov MTIM1CNT, SensorReading brclr ACMP1SC_ACF, ACMP1SC, NoReading Freescale Semiconductor Getting Started with RS08, Rev. 1 Emulated ADC Application Example ; Single byte instruction ; Single byte instruction ; RC Initial low ; Set Output pins ;Change Timer resolution ;OF period ;Reset and Start Timer ...

Page 26

... Number ;disable ACMP ;mask int and clear flag ; ;Extract 2 MSB ; ; ;Mask all other bits ;Add to Lookup table page ;High page ; ;Extract 6 LSB ;Index to paging window ; ;Read upper memory ;Store lookup table content ;Return to register page ; Freescale Semiconductor ...

Page 27

... For MC9RS08KA2, bus frequency can be changed by reprogramming the TRIM register and bus frequency divider bits in the ICSC2 register. (Refer to MC9RS08KA2 data sheet for more details.) Freescale Semiconductor 264ms Figure 2-7. 2.5V Input R-C Charging Profile Getting Started with RS08, Rev. 1 ...

Page 28

... ADC IN = 2.5V Table 2-8. Emulated ADC Performance Expected ADC code (Decimal 102 127 153 178 204 229 Getting Started with RS08, Rev. 1 ADC =5V is shown in DD Measured ADC code (Decimal 123 150 175 202 234 Freescale Semiconductor ...

Page 29

... Freescale Semiconductor Emulated ADC Performance 2 4 ADC In (Voltage) Figure 2-9. Emulated ADC Performance Getting Started with RS08, Rev. 1 Emulated ADC Application Example Expected Measured 6 29 ...

Page 30

... Emulated ADC Application Example Appendix A Program Listing ;************************************************************** ; ; (c) copyright Freescale Semiconductor, Inc. 2006. ; ALL RIGHTS RESERVED ; ;************************************************************** ;************************************************************** ;* Emulated ADC Coding for MC9RS08KA2 ;* ;* Author: Vincent Ko ;* Date: Jan 2006 ;* ;* PTA0/KBI0/ACMP+ ;* PTA1/KBI1/ACMP- ;* PTA5/KBI5 ;* ;************************************************************** ; include derivative specific macros XDEF Entry include "MC9RS08KA2.inc" ;========================================================================= ; ICS Definition ;========================================================================= ICS_DIV_1 equ ICS_DIV_2 ...

Page 31

... SRTISC ;------------------------------------------------------- ; Init RAM ;------------------------------------------------------- clr SensorReading clr ADCOut ;------------------------------------------------------- ; Config GPIO ; RC - init L ;------------------------------------------------------- mov #(mDATAOUT), PTAD mov #(mRC|mDATAOUT), PTADD Freescale Semiconductor $02 $03 $04 $05 $06 $07 PTAD_PTAD0 mPTAD_PTAD0 PTAD_PTAD5 mPTAD_PTAD5 $3E00 Getting Started with RS08, Rev. 1 Emulated ADC Application Example ; $3FFB ; $3FFA ; Use 1.15MHz bus ...

Page 32

... ACMP Flag ;disable ACMP ;mask int and clear flag ;Biggest Number ;disable ACMP ;mask int and clear flag ; ;Extract 2 MSB ; ; ;Mask all other bits ;Add to Lookup table page ;High page ; ;Extract 6 LSB ;Index to paging window ; ;Read upper memory Freescale Semiconductor ...

Page 33

... Reset Vector ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% org $3ffc Security: dc.b $FF jmp main Freescale Semiconductor Getting Started with RS08, Rev. 1 Emulated ADC Application Example ;Store lookup table content ;Return to register page ; ;5 Start bit ;5 dummy ;3 dummy ;1 dummy ; End bit ...

Page 34

... Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer ...

Related keywords