Home

STC32 USER MANUAL

image

Contents

1. Input channel n 0 or 1 Output position count O 20 void set_encoder int n int offset Function set the initial position count of the assigned motor channel Input channel n 0 or 1 Output none 6 6 ADC O 1 void get_adc int ain Function read the input voltage of channels 0 and 1 Input none Output ain 0 and ain 1 are the converted ADC value respectively 6 7 PWM 8254 Timer O 1 void set_pwm int n int duty Function send PWM output Input channel n 1 or 2 0 lt duty lt 1000 represents the PWM s duty cycle and 1000 represents 100 Output PWM output with frequency 8 33 Khz 6 8 DI O 8255 Port A bit7 bit4 Port C bit 3 bit OL O 1 void set_servo_on int n Function output motor driver enable signal Input channel n 0 or 1 Output none O 2 void set_servo_off int n Function output motor driver disable signal Input channel n 0 or 1 Output none O 3 int get_positive_limit int n Function sense the status of the assigned positive limit switch Input channel n 0 or 1 Spinel Technology Corporation 7 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief Output 1 if senses the assigned limit switch and 0 if not O 4 int get_negative_limit int n Function sense the status of the assigned negative limit switch Input channel n 0 or 1 Output 1 if senses the ass
2. I O Figure 3 STC3 s external connectors 6L System Basic I O Functions The STC32system basic I O functions for C Language is saved in the fils STC32I0 H STC3210 C and STC3210 OBJ 6 1 System initialization and interrupt routines O 10 void stc32_init void Function STC32 system initialization routine must call at beginning Input none Output none Spinel Technology Corporation 4 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief O 20 void c_int01 void Function External interrupt INT 0 service routine system reserved and not open for the user Input none Output none O 30 void c_int07 void Function internal timer 0 interrupt service routine system reserved and not open for the user Input none Output none O 40 void c_int08 void Function internal timer 1 interrupt service routine open for the user Input none Output none O 50 void settimer1clk int freq Function setting the internal timer 1 interrupt frequency Input interrupt frequency value Output none O 6 void inittimelisr void Function start execution timer 1 ISR c_intO8 routine Input none Output none O 70 void disabletimerlisr void Function stop execution timer 1 ISR c_int08 routine Input none Output none O 8 void enabletimerlisr void Function restart execution timer 1 ISR c_int08 rou
3. Home sensor 39 n z gt Negative limit switch 2 Figure 4 Single axis motion control example Spinel Technology Corporation 9 11 http www spinel com tw 2001 4 9 STC 32 Embedded C32 DSP Controller User Manual Brief 8 2 XY table X axis XY table Y axis Ree eee CN1 Limit gt 3 IR Limit switches ee 4 1L Limit eo a IRST DC motor _ 54_ 1CMD caver FH IS motor a 22 IIA m24 1B encoder 50 TIZ Limit gt 7 joR Limit switches 78 2L Li imit k15 I2RST DC motor 33 2CMD driver f____ 73 axpy Motor gt 26 2A melag 2B encoder _______ 3 27 Figure 5 XY table motion control example 8 3 DC motor CNI1 522 encoder Z 24 gt 34 M H bridge PWM DC _ me 18 M amplifier motor AINO j current feedback Figure 6 DC motor control example 8 4 Blushless DC Motor Spinel Technology Corporation http www spinel com tw 10 11 STC 32 Embedded C32 DSP Controller User Manual Brief CNI 22 24 34 A B encoder 7 hall sensor U YUH VH wa Blushless V_ commutor PWM 18 DC motor 4 W and inverter U current AINO V current AINI Figure 7 Blushless DC motor control example 8 5 MR sensor or
4. STC 32 Embedded C32 DSP Controller User Manual Brief STC32 USER MANUAL Part of manual only full manual on request 1 STC32 DSP Board Specification 1 1 STC32 DSP board specification 1 T I TMS320C32PCMS0 50MHz 32 bit floating point CPU 2 32K words SRAM zero wait states 3 32K or 64K bytes ROM 2 wait states 4 2 channels ADC 12 bit resolution 1OOKHz sampling rate 10 V input 5 2 channels DAC 12 bit resolution 1OOKHz setting rate 10 V output 6 2 channels encoder input A A B B Z Z 24 bit counter each 7 1 channel RS 232C UART serial port 8 24 bits digital input output 16x2 LCD display 4x4 keyboard 9 2 channels PWM output 16 bit resolution each 10 one DSPLINK3 expansion slot 11 system function extendable with additional daughter board 1 2 STC32 system block diagram 27256 gt el ADCx2 SRAM 61256 __ gt DAC x2 p gt x4 TMS320 Encoder _ 16x2 C32 counter x2 LCD aa gt PWM x2 gt Keybd gt DDA x2 gt User yO lt gt DIO y Figure 1 STC32 system block diagram Spinel Technology Corporation 1 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief 2 System Requirement 2 1 System requirement O 10 STC32 DSP Board O 20 ROM simulator for 27256 27512 or TI XDS510 Emulator O 30 Power supply 5V 1A 12V 0 1A
5. and 12V 0 1A O 4U PC 486 and above with TI TMS320C3x C4x Optimizing C Compiler for DOS or C3x Code Composer for Windows O 50 RS232 cable 3 wires 2 2 Environment to develop STC32 Software There are four different configurations to develop STC32 DSP board software Figure 2 1 use C3x Code Composer and T I XDS510 emulator 2 use T I XDS510 emulator 3 use ROM simulator and 4 use EPROM writer PC STC32 Win98 NT U ei e e Composer RS232 y saj XDS510 5y 12V 1 Use C3x Code Composer and T I XDS510 Emulator PC STC32 RS232 system XDS510 5y 12V DOS 2 Use T I XDS510 emulator Spinel Technology Corporation 2 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief PC ROM simulator STC32 Ipt C DOS com2 RS232 CT 5V 12V 3 Use ROM simulator PC STC32 User s DOS coma a system C7 5V 12V 4 Use EPROM writer Figure 2 Configurations for developing STC32 software 1 use C3x Code Compose and T I XDS510 emulator 2 use T I XDS510 emulator 3 use ROM simulator and 4 use EPROM writer 3 Hardware Description 3 1 TMS320C32 50MHz DSP STC32 board s CPU is a 32 bit floating point digital signal
6. igned limit switch and 0 if not 6 9 LCDI 8255 Port BIJ O 10 void LCD_flush void Function clear and reset the LCD display Input none Output none O 20 int LCD_out char chr Function display one character in the LCD display at the current cursor position Input character to be display Output lif success and 0 if fail O 3 int string2LCD char chr Function display a character string to the LCD display Input string to be display Output lif success and 0 if fail O 40 void LCD_HOMEO0 void LCD_HOME1 void Function set the LCD display cursor in the top left home position Input none Output none 6 10 4x4 keyboard 8255 Port A bit3 bitO Port C bit7 bit4 O 1 void keybd_flush void Function clear and reset keyboard Input none Output none O 20 int kbhit void Spinel Technology Corporation 8 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief Function check is any key pressed Input none Output 1 if a key has been pressed and 0 if no key pressed O 3 int getkbt void Function read the key code of the key pressed Input none Output the key code and 0 if no key pressed SL Applications 8 1 Single axis table CNI 522 encoder Z 24 Single axis table DC Motor Positive limit switch 4
7. processor TMS320C32PCM 50MHz or C32 in short Thesystanhas 32K x 32 bits Static RAM 61256 15 zero wat state and 32Kx 8 bits EPROM 27256 two wait states With C32 s boot loader the program stored in the EPROM will be loaded into the sytem RAM inrediate after the system stats TheTMS320C3X 30 31 32 and 33 ave 32 bit digita Signal processors capable of pafoming float point integer and logical operations Its architecture dlows four leds of pipdining While an instruction is baing executed the next three instructions are being consequently fetched decoded and read Many instructions can be executed in pard ld such as load with store multiply with add and so Spinel Technology Corporation 3 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief on TheTMS320C32 is a different version of the TMS320C30 processor with the sare execution speed but with only one primary bus and two seia ports The C32 boot loader can load and execute programs received from EPROM and support 8 bit 16 bit and 32 bit data type sizes 4 STC32 External Connectors 4 1 STC32 s external connectors LCD RS232 DSPLINK3 display ROM simulator a E ot P JEI Pl s Bo Jpm ower STC32 V1 0 bl system PPE ra U7 expansion XDS510 JP3 slot Ve ti DSP Peal CNI keyboard External he J3
8. sin cos encoder position decoder CNI i AINO Sin tp 23 MR sensor COS pene amplifier 1 25 Figure 8 MR sensor position decoder example 8 6 System frequency response identification CNI DACO 54 User system AINO 23 Figuire 9 System frequency response identification example FP ease inqui ry for full user s nanal Spinel Technology Corporation 11 11 2001 4 9 http www spinel com tw
9. tine Input none Output none Spinel Technology Corporation 5 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief 6 2 RS232 serial communication The default serial communication format is as follows 9600 baud rate 8 bits 1 start bit 1 stop bit and no parity O 1 void rs232_flush void Function reset RS232 serial communication and clear receiver transmitter buffers Input none Output none O 20 char rs232_in void Function get one character from RS232 receiver buffer Input none Output character received or 0 if no character received O 30 int rs232_out char chr Function send one character to the transmitter buffer and then send out by ISR c_int07 Input character to be send Output 1 if success i e the buffer is not full and 0 if fail O 4 int string2PC char str Function send character string to the transmitter buffer Input character string to be sent Output 1 if success and 0 if fail 6 4 DAC O 1 int set_dac_cmd int n real x Function output an analog voltage to the assigned channel Input channel n 0 or 1 output voltage x 10 lt x lt 10 Output none 6 5 Encoder O 1 int get_encoder int n Function read the position count of the assigned motor channel Spinel Technology Corporation 6 11 2001 4 9 http www spinel com tw STC 32 Embedded C32 DSP Controller User Manual Brief

Download Pdf Manuals

image

Related Search

Related Contents

User Manual - OVALE United Kingdom    NEC E463 Mechanical Drawings  Pure Garden 50-0010 Use and Care Manual  présentation de la séquence et principes péda (doc prof)  Final Wall カタログ  YT-M06 - Tiu.ru  Welcome to the aidmatrixSM Online Shopping Service User Manual  

Copyright © All rights reserved.
Failed to retrieve file