MV1200/MV8515 Vx.47 SPECIFICATION FEATURES -------- - High Performance and Low Power RISC Architecture - 120 Powerful Instructions - Most Single Clock Cycle Execution - 64kbits of In-System Reprogrammable Downloadable Flash - SPI Serial Interface for Program Downloading - 512 bytes EEPROM - Endurance: 100,000 Write/Erase Cycles - 512 bytes Internal SRAM - 32 x 8 General Purpose Working Registers - 35 Programmable I/O Lines - Programmable Serial UART - SPI Serial Interface - VCC : 2.7 - 6.6V - One 8-Bit Timer/Counter with Separate Prescaler - One 16-Bit Timer/Counter with Separate Prescaler, Compare, and Capture Modes - Dual PWM - External and Internal Interrupt Sources - Programmable Watchdog Timer with On-Chip Oscillator - On-Chip Analog Comparator - Low Power Idle and Power Down Modes - Programming Lock for Software Security INTRODUCTION ------------ The MV1200/MEG6/MEG8515 advanced RISC architecture has significant advantages over other micro-controllers. These include lower cost, higher performance, easier programming, and they run with ZERO external components. No crystal, caps, or external memory are needed. Crystal versions are available however at the same price (MV1200a/MEG6a/MEG8515a). Because of longer instruction word and because the clock is not divided down internally it runs about 10 times faster than PIC, 8051, or Z80 type controllers at the same clock frequency. Another advantage is built-in BASIC like "Stamp" type circuit board modules except CPU, memory, and oscillator components are in a single IC and more ports are available. The MEG6/MEG8515 stores over 300 times more BASIC than the original chip. Programs are downloaded from a PC over an RS232 port. Special development tools are not required. In BASIC the MEG8515 has eight serial input/output lines, 27 bidirectional parallel port bits, an Analog-to-Digital Converter (ADC), and a synchronous serial bus (SPI, I2C, etc.) supported by the BASIC interpreter. Up to 35 DAC channels are also available in addition to a Real-Time-Calendar-Clock (RTCC) . This chip can be programmed in Assembly (using RS232!). In this case with 35 I/O bits, 2 timer/counters, UART, and analog comparator. These products are intended for low end applications and education in the area of embedded controllers. For more complex tasks a "Credit Card Computer" is available (CCC) with 256k/4m non-volatile memory, high speed 4ch ADC, enhanced BASIC instructions, "Plug-N-Go" download, Single-wire Multi-drop Long-distance Network (SMPLNET), and ISA bus for PC adapter cards (modem, video, PCMCIA, etc.). For high end applications MVS has a line of PC compatible 8088 and 386 Single Board Computers with up to 64 Mbyte memory capacity and DOS. See PRICELST.TXT or the website for info. BASIC INTERPRETER ----------------- v=x[#x#x..] assign expression,# is +,-,&(and),|(or),*{^(xor),*(mult),/(div)} adc v *get analog value from A to D Converter into var, 0=0v...255=5v baud x set baud rate, @7.3728mhz 253=9.6k 122=19.2 18=115.2 etc. clear set variables to default: a=0, b=32, c=0, d=56(PORTB) *SYSCON=6 data k,k... define data, 3 byte header, access via read/write, default b=32 defio x set i/o pointer (d) for inp/out, default=56(PORTB), see i/o map defmem x set nvmem byte pointer (b) for read/write, default b=32 end power down til interrupt or reset, re-starts from beginning erase (CCC2 only) erase flash block, block number set by pc0-2 for c=0 to k for/next loop part 1 (sets loop point and counter for "next") gosub k unconditional subroutine call to line, use ret to return (+-8K) goto k unconditional jmp to line(pushes ret adr, same as gosub w/o ret) if v#x then k conditional goto, # is =,>,<,! (jmp range +-1K) inp v get port pointed to by defio (d) to variable, use PINB not PORTB input v get 3 digit decimal number from active serial into var next c for/next part 2, c=c+1 if c15 bytes between gosub and ret) serin v get serial byte from active com port into var serin1 v get serial byte from rx1 serin2 v get serial byte from rx2 serin3 v get serial byte from rx3 serin4 v get serial byte from rx4 (port direction must be changed) serout x send serial byte out active com port serout1 x send serial byte out tx1 serout2 x send serial byte out tx2 serout3 x send serial byte out tx3 serout4 x *send serial byte out tx4 sleep x pause for 1-256 tics (16ms-4sec), picks up where it left off sound x make 256 cycle tone on tx1 (o.c.), 0=40khz 1=20khz...255=156hz ssin v *get synchronous serial byte into var (SPI/I2C, clk=pd7 dat=pb1) ssout x *send synchronous serial byte sstart *send I2C start signal (clk hi,dat lo,clk lo), use w/ssin-ssout sstop *send I2C start signal (clk hi,dat hi,clk lo), use w/ssin-ssout syscon k *set config options (bit4-3=print format,2-0=pwmbit),default=06 test bit k test pd0/2/*4/*6, if not 0 jmp +-16 toggle bit make bit pd0-7 change its state write x write to nv memory, auto-inc bptr (b), default b=32 k=constant: decimal (0-255), ASCII (' '-'z'), or hex (0x0-0xff) v=variable (a-h) 8 bit x=variable or constant *MV8515 only I/O MAP ------- dec(hex)asm name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 8 (08) BAUD 7.3728mhz: 9.6k=253 19.2=125 38.4=61 57.6=40 115.2=18 9 (09) BPTRH free RAM register in 1200, buffer pointer hi in 8515 11 (0B) free RAM register in 1200 26 (14) SYSCON free RAM in 1200 PRNFMT PRNFMT PWMBIT PWMBIT PWMBIT 27 (1B) SERBIT active serial port (0x01=com1 04=com2 10=com3 40=com4) 29 (1D) free RAM register in 1200 31 (1F) free RAM register in 1200 40 (28) 08 ACSR ACD - ACO ACI ACIE ACIC ACIS1 ACIS0 *41 (29) 09 UBRR UART Baud Rate Register *42 (2A) 0A UCR RXCIE TXCIE UDRIE RXEN TXEN CHR9 RXB8 TXB8 *43 (2B) 0B USR RXC TXC UDRE FE OR - - - *44 (2C) 0C UDR UART I/O Data Register *45 (2D) 0D SPCR SPIE SPE DORD MSTR CPOL CPHA SPR1 SPR0 *46 (2E) 0E SPSR SPIF WCOL - - - - - - *47 (2F) 0F SPDR SPI Data Register *48 (30) 10 PIND PIND7 PIND6 PIND5 PIND4 PIND3 PIND2 PIND1 PIND0 49 (31) 11 DDRD DDD7 DDD6 DDD5 DDD4 DDD3 DDD2 DDD1 DDD0 *50 (32) 12 PORTD PORTD7 PORTD6 PORTD5 PORTD4 PORTD3 PORTD2 PORTD1 PORTD0 *51 (33) 13 PINC PINC7 PINC6 PINC5 PINC4 PINC3 PINC2 PINC1 PINC0 *52 (34) 14 DDRC DDC7 DDC6 DDC5 DDC4 DDC3 DDC2 DDC1 DDC0 *53 (35) 15 PORTC PORTC7 PORTC6 PORTC5 PORTC4 PORTC3 PORTC2 PORTC1 PORTC0 54 (36) 16 PINB PINB7 PINB6 PINB5 PINB4 PINB3 PINB2 PINB1 PINB0 55 (37) 17 DDRB DDB7 DDB6 DDB5 DDB4 DDB3 DDB2 DDB1 DDB0 56 (38) 18 PORTB PORTB7 PORTB6 PORTB5 PORTB4 PORTB3 PORTB2 PORTB1 PORTB0 *57 (39) 19 PINA PINA7 PINA6 PINA5 PINA4 PINA3 PINA2 PINA1 PINA0 *58 (3A) 1A DDRA DDA7 DDA6 DDA5 DDA4 DDA3 DDA2 DDA1 DDA0 *59 (3B) 1B PORTA PORTA7 PORTA6 PORTA5 PORTA4 PORTA3 PORTA2 PORTA1 PORTA0 *60 (3C) 1C EECR - - - - - EEMWE EEWE EERE *61 (3D) 1D EEDR EEPROM Data Register *62 (3E) 1E EEARL EEPROM Address Register *63 (3F) 1F EEARH EEPROM Address Register *65 (41) 21 WDTCR - - - WDTOE WDE WDP2 WDP1 WDP0 *68 (44) 24 ICR1L Timer/Counter1 Input Capture Register Low Byte *69 (45) 25 ICR1H Timer/Counter1 Input Capture Register High Byte *72 (48) 28 OCR1BL Timer/Counter1 Output Compare Register B Low Byte *73 (49) 29 OCR1BH Timer/Counter1 Output Compare Register B High Byte *74 (4A) 2A OCR1AL Timer/Counter1 Output Compare Register A Low Byte *75 (4B) 2B OCR1AH Timer/Counter1 Output Compare Register A High Byte *76 (4C) 2C TCNT1L Timer/Counter1 Counter Register Low Byte *77 (4D) 2D TCNT1H Timer/Counter1 Counter Register High Byte *78 (4E) 2E TCCR1B ICNC1 ICES1 - - CTC1 CS12 CS11 CS10 *79 (4F) 2F TCCR1A COM1A1 COM1A0 COM1B1 COM1B0 - - PWM11 PWM10 82 (52) 32 TCNT0 Timer/Counter0 8 Bit *83 (53) 33 TCCR0 - - - - - CS02 CS01 CS00 *85 (55) 35 MCUCR SRE SRW SE SM ISC11 ISC10 ISC01 ISC00 *88 (58) 38 TIFR TOV1 OCF1A OCF1B - ICF1 - TOV0 - *89 (59) 39 TIMSK TOIE1 OCIE1A OCIE1B - TICIE1 - TOIE0 - *90 (5A) 3A GIFR INTF1 INTF0 *91 (5B) 3B GIMSK INT1 INT0 - - - - - - *93 (5D) 3D SPL SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0 *94 (5E) 3E SPH SP15 SP14 SP13 SP12 SP11 SP10 SP9 SP8 *95 (5F) 3F SREG I T H S V N Z C *96-101 (60-65) SEC,MIN,HR,DAY,MO,YR RTCC (Real-Time-Calendar-Clock) *105-255 (69-ff) USER NVRAM, contents preserved in power down mode ("end") *MV8515 only PINOUT ------ Pin 1 PB0 1- -40 VCC PB1 2- -39 PA0 ADC0/PB2 3- -38 PA1 ADC1/PB3 4- -37 PA2 PB4 5- -36 PA3 PB5 6- -35 PA4 PB6 7- -34 PA5 PB7 8- -33 PA6 RESETL 9- -32 PA7 RX1/PD0 10- -31 PE0 TX1/PD1 11- -30 PE1 RX2/INT0/PD2 12- -29 PE2 TX2/INT1/PD3 13- -28 PC7 RX3/PD4 14- -27 PC6 TX3/PD5 15- -26 PC5 DAC/PD6 16- -25 PC4 SCLK/PD7 17- -24 PC3 XO 18- -23 PC2 XI 19- -22 PC1 GND 20- -21 PC0 ABSOLUTE MAXIMUM RATINGS Operating Temperature ........................ -40C to +105C NOTICE: Stresses beyond those listed under Absolute Maximum Ratings may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Storage Temperature...................................... -65C to +150C Voltage on any Pin except RESET with respect to Ground .. -1.0V to +7.0V Maximum Operating Voltage................................ 6.6VDC Current per I/O Pin...................................... 40.0 mA DC Current VCC and GND Pins................................. 140.0 mA DC CHARACTERISTICS TA = -40C to 85C, VCC = 2.7V to 6.6V (unless otherwise noted) Under steady state (non-transient) conditions, IOL must be externally limited: Maximum IOL per port pin: Port A: 26 mA Ports B, C, D: 15 mA Maximum total IOL for all output pins: 80mA If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test conditions. Minimum VCC for Power Down is 2V. Value tested to 45C Symbol Parameter Conditions Min Typ Max Units VIL Input Low Voltage -0.2 .2 VCC-0.1 V VIH Input High Voltage (Except XTLI, RESET) .2VCC .9 VCC+.5 V VIH1 Input High Voltage (XTLI, RESET) 0.7VCC VCC+.5 V VOL Output Low Voltage IIL=25mA VCC=5V 0.5 V VOH Output High Voltage IOH=3mA VCC=5V VCC-.5 V IOH Output Source Current VCC=5V VOH=4.5V 4 mA IIL Output Sink Current VCC=5V VOL=0.5V 28 mA RRST Reset Pull-Up Resistor 100 500 kohm RI/O Pin Pull-Up Resistor 35 120 kohm ICC Supply Current Active Mode 5V 4MHz 3.5 mA Idle Mode 3V 4MHz 500 uA Power Down WDT enabled 3V 10 15 uA Power Down WDT disabled 3V 0.15 1 uA VACIO Analog Comparator Offset Voltage VCC=5V 20 mV IACLK Analog Comparator Leakage Current VIN=1V 10 nA tACPD Analog Comparator Propagation Delay VCC=4V 500 ns External Clock Drive Symbol Parameter VCC=2.7V VCC=6.6V Units Min Max Min Max 1/tCLCL Oscillator Frequency 0 8 0 20 MHz tCLCL Clock Period 125 50.0 ns tCHCX High Time 40 16.7 ns tCLCX Low Time 40 16.7 ns tCLCH Rise Time 10 4.15 ns tCHCL Fall Time 10 4.15 ns LIMITED WARRANTY MVS will repair free of charge product suffering from manufacturing defects for a period of 5 years after shipping. This will be done only if it has been determined by MVS that the product has not been misused (improper voltages, physical alteration, etc.). Otherwise a minimum service charge is required. In either case it is necessary to contact MVS for a Returned Merchandise Authorization (RMA) number before shipping the unit.