Getting stuck in this project

Here is the first project...I have to write it in C programming language and i used codewarrior as my software. Please help me
Project 1
Tone-Generation Sub-Program:
Write a sub-program that causes the speaker to sound a tone at a given frequency. The speaker is to be connected to a Pulse-Width-Modulation (PWM) output. The duty cycle is to be 50%. The frequency is to be supplied as an argument that is a 32-bit integer with units of 1/100000 Hz. The tone is to be sounded as a result of calling the sub-program one time. The tone is to continue until the sub-program is called again at which time a different tone will be sounded. If the supplied frequency is zero, the tone is to be turned off. No interrupts are allowed. No wait loops are allowed in the tone-generation sub-program. The range of frequencies is from 10.000000 Hz to 5000.000000 Hz., which includes the musical notes listed in Table F.1 of the text. The tone-generation sub-program is to be as accurate as possible.
Test Program:
Write a test program to call the sub-program described above. The test program is to cause ten different tones (including 100 Hz and 5000 Hz) to be sounded. The test program shall step from one tone to the next as a result of pressing a button on the Dragon12-Plus board. After ten tones have been sounded, the next press of the button causes the tone to stop.
What I have done
** Abaqus input deck created with Supersurge Submodel (SSS) automation ** Version: 150205 ** Units: length = mm, mass = kg, time = s, force = mN, pressure = kPa ** 05/08/15 00:12:09 ** *HEADING Super Surge Submodel ******************************************************************************** ** Includes ** ******************************************************************************** *INCLUDE, INPUT=interactions.inp *INCLUDE, INPUT=parameters.inp *INCLUDE, INPUT=part_package.inp *INCLUDE, INPUT=part_closure_simple.inp *INCLUDE, INPUT=part_fluid_single_cavity.inp *INCLUDE, INPUT=part_plate_rigid_back.inp *INCLUDE, INPUT=part_plate_rigid_bottom.inp *INCLUDE, INPUT=part_plate_rigid_front.inp *INCLUDE, INPUT=part_rail_rigid_Solus_WideFlat.inp ******************************************************************************** ** Assembly ** ******************************************************************************** *ASSEMBLY, NAME=SSS *********************************** Packages *********************************** *INSTANCE, NAME=PACKAGE_1, PART=PART_PACKAGE <PACKAGE_1_X>, <PACKAGE_1_Y>, <PACKAGE_1_Z> <PACKAGE_1_X>, <PACKAGE_1_Y>, 0.0, <PACKAGE_1_X>, <PACKAGE_1_Y>, 1.0, <PACKAGE_1_RZ> *END INSTANCE *INSTANCE, NAME=PACKAGE_2, PART=PART_PACKAGE <PACKAGE_2_X>, <PACKAGE_2_Y>, <PACKAGE_2_Z> <PACKAGE_2_X>, <PACKAGE_2_Y>, 0.0, <PACKAGE_2_X>, <PACKAGE_2_Y>, 1.0, <PACKAGE_2_RZ> *END INSTANCE *********************************** Closures *********************************** *INSTANCE, NAME=CLOSURE_SIMPLE_1, PART=PART_CLOSURE_SIMPLE <CLOSURE_1_X>, <CLOSURE_1_Y>, <CLOSURE_1_Z> <CLOSURE_1_X>, <CLOSURE_1_Y>, 0.0, <CLOSURE_1_X>, <CLOSURE_1_Y>, 1.0, <CLOSURE_1_RZ> *END INSTANCE *INSTANCE, NAME=CLOSURE_SIMPLE_2, PART=PART_CLOSURE_SIMPLE <CLOSURE_2_X>, <CLOSURE_2_Y>, <CLOSURE_2_Z> <CLOSURE_2_X>, <CLOSURE_2_Y>, 0.0, <CLOSURE_2_X>, <CLOSURE_2_Y>, 1.0, <CLOSURE_2_RZ> *END INSTANCE ************************************ Fluids ************************************ *INSTANCE, NAME=FLUID_SINGLE_CAVITY_1, PART=PART_FLUID_SINGLE_CAVITY <FLUID_1_X>, <FLUID_1_Y>, <FLUID_1_Z> <FLUID_1_X>, <FLUID_1_Y>, 0.0, <FLUID_1_X>, <FLUID_1_Y>, 1.0, <FLUID_1_RZ> *END INSTANCE *INSTANCE, NAME=FLUID_SINGLE_CAVITY_2, PART=PART_FLUID_SINGLE_CAVITY <FLUID_2_X>, <FLUID_2_Y>, <FLUID_2_Z> <FLUID_2_X>, <FLUID_2_Y>, 0.0, <FLUID_2_X>, <FLUID_2_Y>, 1.0, <FLUID_2_RZ> *END INSTANCE ************************************ Rails ************************************* *INSTANCE, NAME=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT, PART=PART_RAIL_RIGID_SOLUS_WIDEFLAT 0.0, <RAIL_BOTTOM_RIGHT_Y>, <RAIL_BOTTOM_RIGHT_Z> 0.0, <RAIL_BOTTOM_RIGHT_Y>, <RAIL_BOTTOM_RIGHT_Z>, 1.0, <RAIL_BOTTOM_RIGHT_Y>, <RAIL_BOTTOM_RIGHT_Z>, <RAIL_BOTTOM_RIGHT_RX> *END INSTANCE *INSTANCE, NAME=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT, PART=PART_RAIL_RIGID_SOLUS_WIDEFLAT 0.0, <RAIL_BOTTOM_LEFT_Y>, <RAIL_BOTTOM_LEFT_Z> 0.0, <RAIL_BOTTOM_LEFT_Y>, <RAIL_BOTTOM_LEFT_Z>, 1.0, <RAIL_BOTTOM_LEFT_Y>, <RAIL_BOTTOM_LEFT_Z>, <RAIL_BOTTOM_LEFT_RX> *END INSTANCE *INSTANCE, NAME=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT, PART=PART_RAIL_RIGID_SOLUS_WIDEFLAT 0.0, <RAIL_MID_RIGHT_Y>, <RAIL_MID_RIGHT_Z> 0.0, <RAIL_MID_RIGHT_Y>, <RAIL_MID_RIGHT_Z>, 1.0, <RAIL_MID_RIGHT_Y>, <RAIL_MID_RIGHT_Z>, <RAIL_MID_RIGHT_RX> *END INSTANCE *INSTANCE, NAME=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT, PART=PART_RAIL_RIGID_SOLUS_WIDEFLAT 0.0, <RAIL_MID_LEFT_Y>, <RAIL_MID_LEFT_Z> 0.0, <RAIL_MID_LEFT_Y>, <RAIL_MID_LEFT_Z>, 1.0, <RAIL_MID_LEFT_Y>, <RAIL_MID_LEFT_Z>, <RAIL_MID_LEFT_RX> *END INSTANCE *INSTANCE, NAME=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT, PART=PART_RAIL_RIGID_SOLUS_WIDEFLAT 0.0, <RAIL_TOP_RIGHT_Y>, <RAIL_TOP_RIGHT_Z> 0.0, <RAIL_TOP_RIGHT_Y>, <RAIL_TOP_RIGHT_Z>, 1.0, <RAIL_TOP_RIGHT_Y>, <RAIL_TOP_RIGHT_Z>, <RAIL_TOP_RIGHT_RX> *END INSTANCE *INSTANCE, NAME=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT, PART=PART_RAIL_RIGID_SOLUS_WIDEFLAT 0.0, <RAIL_TOP_LEFT_Y>, <RAIL_TOP_LEFT_Z> 0.0, <RAIL_TOP_LEFT_Y>, <RAIL_TOP_LEFT_Z>, 1.0, <RAIL_TOP_LEFT_Y>, <RAIL_TOP_LEFT_Z>, <RAIL_TOP_LEFT_RX> *END INSTANCE ************************************ Plates ************************************ *INSTANCE, NAME=PLATE_RIGID_BACK, PART=PART_PLATE_RIGID_BACK <BACK_PLATE_X>, 0.0, 0.0 <BACK_PLATE_X>, 0.0, 0.0, <BACK_PLATE_X>, 0.707107, 0.707107, 180.0 *END INSTANCE *INSTANCE, NAME=PLATE_RIGID_BOTTOM, PART=PART_PLATE_RIGID_BOTTOM 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 90.0 *END INSTANCE *INSTANCE, NAME=PLATE_RIGID_FRONT, PART=PART_PLATE_RIGID_FRONT 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 90.0 *END INSTANCE ************************************ Ties ************************************ *TIE, NAME=PACKAGE_CLOSURE_ASSEMBLY_1 CLOSURE_SIMPLE_1.CLOSURE_INTERNAL, PACKAGE_1.PACKAGE_INTERNAL *TIE, NAME=PACKAGE_CLOSURE_ASSEMBLY_2 CLOSURE_SIMPLE_2.CLOSURE_INTERNAL, PACKAGE_2.PACKAGE_INTERNAL ********************************** Springs *********************************** *ELEMENT, TYPE=SPRING1, ELSET=SPRINGX 1, CLOSURE_SIMPLE_1.<CLOSURE_1_NODE_CLOSURE_CENTER> 2, CLOSURE_SIMPLE_2.<CLOSURE_2_NODE_CLOSURE_CENTER> *ELEMENT, TYPE=SPRING1, ELSET=SPRINGY 3, CLOSURE_SIMPLE_1.<CLOSURE_1_NODE_CLOSURE_CENTER> 4, CLOSURE_SIMPLE_2.<CLOSURE_2_NODE_CLOSURE_CENTER> *ELEMENT, TYPE=SPRING1, ELSET=SPRINGZ 5, CLOSURE_SIMPLE_1.<CLOSURE_1_NODE_CLOSURE_CENTER> 6, CLOSURE_SIMPLE_2.<CLOSURE_2_NODE_CLOSURE_CENTER> *SPRING, ELSET=SPRINGX 1 10.0 *SPRING, ELSET=SPRINGY 2 10.0 *SPRING, ELSET=SPRINGZ 3 10.0 *ELEMENT, TYPE=SPRING1, ELSET=SPRING_PLATE_BACK 11, PLATE_RIGID_BACK.1 *SPRING, ELSET=SPRING_PLATE_BACK 1 10.0 *ELEMENT, TYPE=MASS, ELSET=MASS_PLATE_BACK 12, PLATE_RIGID_BACK.1 *MASS, ELSET=MASS_PLATE_BACK 1 *********************************** Nodesets *********************************** *NSET, NSET=NODES_RAILS RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE *NSET, NSET=NODES_PACKAGES_CLOSURE CLOSURE_SIMPLE_1.NODES_CLOSURE, CLOSURE_SIMPLE_2.NODES_CLOSURE *NSET, NSET=NODES_PACKAGES_AIR_CAVITY_REFERENCE FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE, FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE ********************************* Elementsets ********************************** *ELSET, ELSET=ELEMENTS_PACKAGES PACKAGE_1.ELEMENTS_PACKAGE, PACKAGE_2.ELEMENTS_PACKAGE *********************************** Surfaces *********************************** ** Fluid surfaces *SURFACE, NAME=LIQUID_1, COMBINE=UNION CLOSURE_SIMPLE_1.CLOSURE_INTERNAL, PACKAGE_1.PACKAGE_INTERNAL *SURFACE, NAME=LIQUID_2, COMBINE=UNION CLOSURE_SIMPLE_2.CLOSURE_INTERNAL, PACKAGE_2.PACKAGE_INTERNAL ** All package exterior surfaces *SURFACE, NAME=PACKAGES, COMBINE=UNION PACKAGE_1.PACKAGE_EXTERNAL, PACKAGE_2.PACKAGE_EXTERNAL ** Package surfaces for contact with adjacent packages *SURFACE, NAME=PACKAGE_1_TO_2, TYPE=ELEMENT PACKAGE_1.ELEMENTS_QUADRANT_3, SPOS *SURFACE, NAME=PACKAGE_2_TO_1, TYPE=ELEMENT PACKAGE_2.ELEMENTS_QUADRANT_4, SPOS ** Package surfaces for contact with guide rails *SURFACE, NAME=PACKAGES_TO_RAIL_BOTTOM_RIGHT, CROP PACKAGES <COORD_X_MIN>, <RAIL_BOTTOM_RIGHT_Y_MIN>, <RAIL_BOTTOM_RIGHT_Z_MIN>, <COORD_X_MAX>, <RAIL_BOTTOM_RIGHT_Y_MAX>, <RAIL_BOTTOM_RIGHT_Z_MAX> *SURFACE, NAME=PACKAGES_TO_RAIL_BOTTOM_LEFT, CROP PACKAGES <COORD_X_MIN>, <RAIL_BOTTOM_LEFT_Y_MIN>, <RAIL_BOTTOM_LEFT_Z_MIN>, <COORD_X_MAX>, <RAIL_BOTTOM_LEFT_Y_MAX>, <RAIL_BOTTOM_LEFT_Z_MAX> *SURFACE, NAME=PACKAGES_TO_RAIL_MID_RIGHT, CROP PACKAGES <COORD_X_MIN>, <RAIL_MID_RIGHT_Y_MIN>, <RAIL_MID_RIGHT_Z_MIN>, <COORD_X_MAX>, <RAIL_MID_RIGHT_Y_MAX>, <RAIL_MID_RIGHT_Z_MAX> *SURFACE, NAME=PACKAGES_TO_RAIL_MID_LEFT, CROP PACKAGES <COORD_X_MIN>, <RAIL_MID_LEFT_Y_MIN>, <RAIL_MID_LEFT_Z_MIN>, <COORD_X_MAX>, <RAIL_MID_LEFT_Y_MAX>, <RAIL_MID_LEFT_Z_MAX> *SURFACE, NAME=PACKAGES_TO_RAIL_TOP_RIGHT, CROP PACKAGES <COORD_X_MIN>, <RAIL_TOP_RIGHT_Y_MIN>, <RAIL_TOP_RIGHT_Z_MIN>, <COORD_X_MAX>, <RAIL_TOP_RIGHT_Y_MAX>, <RAIL_TOP_RIGHT_Z_MAX> *SURFACE, NAME=PACKAGES_TO_RAIL_TOP_LEFT, CROP PACKAGES <COORD_X_MIN>, <RAIL_TOP_LEFT_Y_MIN>, <RAIL_TOP_LEFT_Z_MIN>, <COORD_X_MAX>, <RAIL_TOP_LEFT_Y_MAX>, <RAIL_TOP_LEFT_Z_MAX> ** Package surfaces for contact with plates *SURFACE, NAME=PACKAGES_TO_PLATE_BOTTOM, CROP PACKAGES <COORD_X_MIN>, <COORD_Y_MIN>, <COORD_Z_MIN>, <COORD_X_MAX>, <COORD_Y_MAX>, 10.0 *SURFACE, NAME=PACKAGES_TO_PLATE_FRONT, CROP PACKAGES <PLATE_FRONT_X_MIN>, <COORD_Y_MIN>, <COORD_Z_MIN>, <COORD_X_MAX>, <COORD_Y_MAX>, <COORD_Z_MAX> *SURFACE, NAME=PACKAGES_TO_PLATE_BACK, CROP PACKAGES <COORD_X_MIN>, <COORD_Y_MIN>, <COORD_Z_MIN>, <PLATE_BACK_X_MAX>, <COORD_Y_MAX>, <COORD_Z_MAX> *END ASSEMBLY ******************************************************************************** ** Fluid Cavity Definition ** ******************************************************************************** *FLUID CAVITY, MINIMUM VOLUME-6, BEHAVIOR=LIQUID_1, NAME=LIQUID_1, REF NODE=SSS.FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE, SURFACE=SSS.LIQUID_1, AMBIENT PRESSURE=<PRESSURE_AMBIENT_AIR>
*FLUID BEHAVIOR, NAME=LIQUID_1, USER *FLUID CAVITY, MINIMUM VOLUME-6, BEHAVIOR=LIQUID_2, NAME=LIQUID_2, REF NODE=SSS.FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE, SURFACE=SSS.LIQUID_2, AMBIENT PRESSURE=<PRESSURE_AMBIENT_AIR>
*FLUID BEHAVIOR, NAME=LIQUID_2, USER ******************************************************************************** ** Amplitude Curves ** ******************************************************************************** *AMPLITUDE, NAME=GRAVITY_RAMP, DEFINITION=SMOOTH STEP 0.0, 0.0 <TIME_GRAVITY>, 1.0 <STEP_1_END_TIME>, 1.0 *AMPLITUDE, NAME=FILL_RAMP, DEFINITION=SMOOTH STEP 0.0, 0.0 <TIME_GRAVITY>, 0.0 <TIME_FILL_RAMP>, 1.0 <STEP_1_END_TIME>, 1.0 *AMPLITUDE, NAME=LOAD_RAMP, DEFINITION=SMOOTH STEP 0.0, 0.0 <STEP_3_END_TIME>, 1.0 *AMPLITUDE, NAME=LOAD_HOLD, DEFINITION=SMOOTH STEP 0.0, 1.0 <STEP_4_END_TIME>, 1.0 *AMPLITUDE, NAME=UNLOAD_RAMP, DEFINITION=SMOOTH STEP 0.0, 1.0 <STEP_5_END_TIME>, <FORCE_UNLOAD_BACK_PLATE> ******************************************************************************** ** Steps ** ******************************************************************************** ***************************** 1. Fill the packages ***************************** *STEP, NLGEOM, INC=<STEP_1_INCREMENTS_MAXIMUM> STEP 1 - Fill the packages *VISCO, CETOL=0.01 <STEP_1_STEP_SIZE_INITIAL>, <STEP_1_END_TIME>, <STEP_1_STEP_SIZE_MINIMUM>, <STEP_1_STEP_SIZE_MAXIMUM> *CONTROLS, RESET *CONTROLS, PARAMETERS=TIME INCREMENTATION 8, 10, , , , , 20, 15, , , *BOUNDARY PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 1, 6, 0.0 NODES_RAILS, 1, 6, 0.0 NODES_PACKAGES_CLOSURE, 4, 6, 0.0 NODES_PACKAGES_AIR_CAVITY_REFERENCE, 8, 8, 0.0 *DLOAD, AMPLITUDE=GRAVITY_RAMP ELEMENTS_PACKAGES, GRAV, -<GRAVITY>, 0.0, 0.0, 1.0 *DLOAD, AMPLITUDE=FILL_RAMP ELEMENTS_PACKAGES, HP, <HYDRO_PRESSURE>, <COORD_FILL_HEIGHT_CALCULATED>, <COORD_Z_MIN> *MONITOR, NODE=PLATE_RIGID_BACK.NODE_REFERENCE, DOF=1 *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_1_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_1_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP **************************** 2. Seal the packages ****************************** *STEP, NLGEOM, INC=<STEP_2_INCREMENTS_MAXIMUM> STEP 2 - Seal the packages *STATIC <STEP_2_STEP_SIZE_INITIAL>, <STEP_2_END_TIME>, <STEP_2_STEP_SIZE_MINIMUM>, <STEP_2_STEP_SIZE_MAXIMUM> *BOUNDARY, OP=NEW PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 1, 6, 0.0 NODES_RAILS, 1, 6, 0.0 NODES_PACKAGES_CLOSURE, 4, 6, 0.0 *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_2_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_2_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP ****************************** 3. Apply the load ******************************* *STEP, NLGEOM, INC=<STEP_3_INCREMENTS_MAXIMUM> STEP 3 - Apply the load *DYNAMIC, APPLICATION=QUASI-STATIC, INITIAL=YES <STEP_3_STEP_SIZE_INITIAL>, <STEP_3_END_TIME>, <STEP_3_STEP_SIZE_MINIMUM>, <STEP_3_STEP_SIZE_MAXIMUM> *CONTACT CONTROLS, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID, STABILIZE=0.02 *CONTACT CONTROLS, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID, STABILIZE=0.02 *CONTACT CONTROLS, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1, STABILIZE=0.02 *BOUNDARY, OP=NEW PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 2, 6, 0.0 NODES_RAILS, 1, 6, 0.0 *CLOAD, OP=NEW, AMPLITUDE=LOAD_RAMP PLATE_RIGID_BACK.NODE_REFERENCE, 1, <FORCE_BACK_PLATE> *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_3_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_3_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP ****************************** 4. Hold the load ******************************* *STEP, NLGEOM, INC=<STEP_4_INCREMENTS_MAXIMUM> STEP 4 - Hold the load *DYNAMIC, APPLICATION=QUASI-STATIC, INITIAL=YES <STEP_4_STEP_SIZE_INITIAL>, <STEP_4_END_TIME>, <STEP_4_STEP_SIZE_MINIMUM>, <STEP_4_STEP_SIZE_MAXIMUM> *BOUNDARY, OP=NEW PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 2, 6, 0.0 NODES_RAILS, 1, 6, 0.0 *CLOAD, OP=NEW, AMPLITUDE=LOAD_HOLD PLATE_RIGID_BACK.NODE_REFERENCE, 1, <FORCE_BACK_PLATE> *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_4_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_4_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP ****************************** 5. Remove the load ****************************** *STEP, NLGEOM, INC=<STEP_5_INCREMENTS_MAXIMUM> STEP 5 - Remove the load *DYNAMIC, APPLICATION=QUASI-STATIC, INITIAL=YES <STEP_5_STEP_SIZE_INITIAL>, <STEP_5_END_TIME>, <STEP_5_STEP_SIZE_MINIMUM>, <STEP_5_STEP_SIZE_MAXIMUM> *BOUNDARY, OP=NEW PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 2, 6, 0.0 NODES_RAILS, 1, 6, 0.0 *CLOAD, OP=NEW, AMPLITUDE=UNLOAD_RAMP PLATE_RIGID_BACK.NODE_REFERENCE, 1, <FORCE_BACK_PLATE> *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_5_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_5_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP *********************************** 6. Relax *********************************** *STEP, NLGEOM, INC=<STEP_6_INCREMENTS_MAXIMUM> *DYNAMIC, APPLICATION=QUASI-STATIC, INITIAL=YES <STEP_6_STEP_SIZE_INITIAL>, <STEP_6_END_TIME>, <STEP_6_STEP_SIZE_MINIMUM>, <STEP_6_STEP_SIZE_MAXIMUM> *BOUNDARY, FIXED, OP=NEW PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 1, 6, 0.0 NODES_RAILS, 1, 6, 0.0 *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_6_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_6_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP ****************************** 7. Remove contact ******************************* *STEP, NLGEOM, INC=<STEP_7_INCREMENTS_MAXIMUM> STEP 7 - Remove contact *DYNAMIC, APPLICATION=QUASI-STATIC, INITIAL=YES <STEP_7_STEP_SIZE_INITIAL>, <STEP_7_END_TIME>, <STEP_7_STEP_SIZE_MINIMUM>, <STEP_7_STEP_SIZE_MAXIMUM> *MODEL CHANGE, TYPE=CONTACT PAIR, REMOVE PACKAGES_TO_PLATE_BACK, PLATE_RIGID_BACK.PLATE_RIGID PACKAGES_TO_PLATE_FRONT, PLATE_RIGID_FRONT.PLATE_RIGID PACKAGE_1_TO_2, PACKAGE_2_TO_1 PACKAGES_TO_RAIL_BOTTOM_RIGHT, RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL PACKAGES_TO_RAIL_BOTTOM_LEFT, RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL PACKAGES_TO_RAIL_MID_RIGHT, RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL PACKAGES_TO_RAIL_MID_LEFT, RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL PACKAGES_TO_RAIL_TOP_RIGHT, RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL PACKAGES_TO_RAIL_TOP_LEFT, RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL *BOUNDARY, OP=NEW PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 2, 6, 0.0 NODES_RAILS, 1, 6, 0.0 *BOUNDARY, FIXED, OP=NEW PLATE_RIGID_BACK.NODE_REFERENCE, 1 NODES_PACKAGES_CLOSURE, 1, 2, 0.0 NODES_PACKAGES_CLOSURE, 4, 6, 0.0 *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_7_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_7_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP ********************************* 8. Recovery ********************************** *STEP, NLGEOM, INC=<STEP_7_INCREMENTS_MAXIMUM> STEP 8 - Recovery *DYNAMIC, APPLICATION=QUASI-STATIC, INITIAL=YES <STEP_8_STEP_SIZE_INITIAL>, <STEP_8_END_TIME>, <STEP_8_STEP_SIZE_MINIMUM>, <STEP_8_STEP_SIZE_MAXIMUM> *BOUNDARY, OP=NEW PLATE_RIGID_BOTTOM.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_FRONT.NODE_REFERENCE, 1, 6, 0.0 PLATE_RIGID_BACK.NODE_REFERENCE, 2, 6, 0.0 NODES_RAILS, 1, 6, 0.0 *BOUNDARY, FIXED, OP=NEW PLATE_RIGID_BACK.NODE_REFERENCE, 1 NODES_PACKAGES_CLOSURE, 1, 2, 0.0 NODES_PACKAGES_CLOSURE, 4, 6, 0.0 *OUTPUT, FIELD, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_8_OUTPUT_NUMBER_INTERVAL> *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BACK, MASTER=PLATE_RIGID_BACK.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_BOTTOM, MASTER=PLATE_RIGID_BOTTOM.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_PLATE_FRONT, MASTER=PLATE_RIGID_FRONT.PLATE_RIGID CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGE_1_TO_2, MASTER=PACKAGE_2_TO_1 CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_BOTTOM_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_MID_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_RIGHT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.RAIL CSTRESS *CONTACT OUTPUT, SLAVE=PACKAGES_TO_RAIL_TOP_LEFT, MASTER=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.RAIL CSTRESS *ELEMENT OUTPUT 1, 2, 3, 4, 5 S, E, SP, EP, STH, MISESMAX *NODE OUTPUT, NSET = CLOSURE_SIMPLE_1.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = CLOSURE_SIMPLE_2.NODE_CLOSURE_CENTER COORD *NODE OUTPUT, NSET = PACKAGE_1.NODES_PACKAGE COORD *NODE OUTPUT, NSET = PACKAGE_2.NODES_PACKAGE COORD *OUTPUT, HISTORY, VARIABLE=PRESELECT, NUMBER INTERVAL = <STEP_8_OUTPUT_NUMBER_INTERVAL> *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_1.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *NODE OUTPUT, NSET=FLUID_SINGLE_CAVITY_2.NODE_AIR_CAVITY_REFERENCE PCAV, CVOL *ELEMENT OUTPUT, ELSET=PACKAGE_1.ELEMENTS_PACKAGE MASS *ELEMENT OUTPUT, ELSET=PACKAGE_2.ELEMENTS_PACKAGE MASS *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_BOTTOM_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_MID_LEFT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_RIGHT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=RAIL_RIGID_SOLUS_WIDEFLAT_TOP_LEFT.NODE_REFERENCE RF, U *ENERGY OUTPUT ALLSD, ALLIE, ALLAE, ALLCD, ALLFD, ALLWK *NODE OUTPUT, NSET=PLATE_RIGID_FRONT.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BACK.NODE_REFERENCE RF, U *NODE OUTPUT, NSET=PLATE_RIGID_BOTTOM.NODE_REFERENCE RF, U *ELEMENT OUTPUT, ELSET=SPRINGX CRF1, CTF1 *ELEMENT OUTPUT, ELSET=SPRINGY CRF2, CTF2 *ELEMENT OUTPUT, ELSET=SPRINGZ CRF3, CTF3 *RESTART, WRITE, NUMBER INTERVAL=1 *END STEP
#include "c:\iccv712\include\hcs12.h" #define G3 7653 #define B3 6074 #define C4 5733 #define C4S 5412 /* sharp */ #define D4 5108 #define E4 4551 #define F4 4295 #define F4S 4054 /* flat */ #define G4 3827 #define A4 3409 #define B4F 3218 #define B4 3037 #define C5 2867 #define D5 2554 #define E5 2275 #define F5 2148 #define ZZ 20 #define toggle 0x04 int delay; void delayby10ms(int kk); void oc5ISR(void); unsigned int score[]          {D4,B3,G3,B3,D4,G4,B4,A4,G4,B3,C4S, D4,ZZ,D4,ZZ,D4,B4,A4,G4,F4S,E4,F4S,G4,ZZ,G4,D4,B3,G3, D4,B3,G3,B3,D4,G4,B4,A4,G4,B3,C4S,D4,ZZ,D4,ZZ,D4, B4,A4,G4,F4S,E4,F4S,G4,ZZ,G4,D4,B3,G3,B4,ZZ,B4, B4,C5,D5,ZZ,D5,C5,B4,A4,B4,C5,ZZ,C5,ZZ,C5,B4,A4,G4, F4S,E4,F4S,G4,B3,C4S,D4,ZZ,D4,G4,ZZ,G4,ZZ,G4,F4S, E4,ZZ,E4,ZZ,E4,A4,C5,B4,A4,G4,ZZ,G4,F4S,D4,ZZ,D4, G4,A4,B4,C5,D5,G4,A4,B4,C5,A4,G4,0}; unsigned int dur[]          {30,10,40,40,40,80,30,10,40,40,40, 80, 3,20,3,20,60,20,40,80,20,20,40, 3,40,40,40,40, 30,10,40,40,40,80,30,10,40,40,40,80, 3,20,03,20, 60,20,40,80,20,20,40, 3,40,40,40,40,20, 3,20, 40,40,40, 3,80,20,20,40,40,40,03,80, 3,40,60,20,40, 80,20,20,40,40,40,80, 3,40,40,03,40, 3,20,20, 40, 3,40, 3,40,40,20,20,20,20,03,40,40,20, 3,20, 60,20,20,20,80,20,20,60,20,40,80}; void main (void) { int j; asm("ldd #_oc5ISR");    // set up oc5 interrupt vector by calling      asm("pshd");            // SetUserVector function using in-line      asm("ldd #50");        // assembly instructions      asm("ldx $EEA4");        //    "      asm("jsr 0,x");        //     "      asm("movw #_oc5ISR,$3E64"); TSCR1 = 0x90;         // enable TCNT, fast timer flag clear TSCR2 = 0x03;         // set TCNT prescaler to 8 TFLG1 = 0xFF;         // clear all TxF flags TIE |= C5I;             // enable TC5 interrupt TIOS |= OC5;             // enable OC5 function TCTL1 = toggle;        // select toggle as OC5 pin action asm(" cli ");         // enable TC5 interrupt j = 0; delay = score[0]; TC5 = TCNT + delay;    // play the first note while (score[j]) { delay = score[j];// play the jth note delayby10ms(dur[j]); j++; } TIOS &= ~OC5;     // stop playinig the song asm ("swi"); } void delayby10ms(int kk) { int i; TIOS |= OC0;         // enable OC0 TC0 = TCNT + 30000;     // start one OC0 operation for (i = 0; i < kk; i++) { while(!(TFLG1 & C0F)); TC0 += 30000; } TIOS &= ~OC0; } #pragma interrupt_handler oc5ISR void oc5ISR(void) { TC5 += delay; }
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.