Summary: You will implement a multirate system that includes three fininte impulse response filters. The sample-rate compression and expansion factors can be controlled in real time using a MATLAB graphical user interface.
addm (add to
memory) และ bc (branch conditional)
คุณอาจจะลองใช้ banz
(branch on auxiliary register not zero) และ b
(branch)ได้เช่นกัน
mrategui ตรง MATLAB
prompt. จากนั้นควรจะมี แถบเลื่อนปรากฏขึ้นมาอัติโนมัติ เพื่อไว้สำหรับปรับค่า
compression และ expansion factor ที่จะส่งไป DSP
hold. ถ้าหากคุณไม่ได้ทำการเปลี่ยน serial port
สำหรับ code นั้น, คุณก็จะสามารถหาค่าสุดท้ายของ compression และ
expansion factor ที่เกิดจาก GUI ได้ที่หน่วยความจำตำแหน่งนี้.
คุณต้องทำการแก้ไข code เพื่อให้ทุกครั้งที่ได้รับค่าใหม่จาก
serial port, compression และ expansion factor ถูกเปลี่ยนด้วย
ถ้าได้รับค่า "1" ทั้งระบบควรจะทำงานที่ full rate; แต่ถ้าเป็น "10" ระบบ
ควรจะต้องเลือก sample 9 ตัว จากแต่ละ sample ที่ถูกประมวลผลที่ lower rate ทิ้งไป
READSER และ WRITSER
ซึ่งใช้ในการอ่ารและส่งค่าไปยัง serial port, ทำการ overwrite AR0,
AR1, AR2, และ registerAR3
เช่นกัน BK และ condition flag
TC. เพราะฉะนั้นให้ระวังว่า register เหล่านี้ไม่ได้ถูกใช้โดยส่วนอื่นใน code,
หรือคุณควรจะต้องทำการ save และ restore ค่าในหน่วยความจำก่อนท่จะเรียกใช้ macro
READSER และ WRITSER ซึ่งสามารถทำได้โดยใช้คำสั่ง
mvdm และ mvmd โดยที่ macro เหล่านี้จะทำการ set up
ค่า AR1 และ AR3 ทุกครั้งที่ถูกเรียกใช้ จึงไม่จำเป็นต้องเปลี่ยน
register ก่อนที่จะเรียกใช้ macro
READSER และ
WRITSER หาได้ที่ Core File: Serial Port Communication
Between MATLAB and TI TMS320C54x.
Comments, questions, feedback, criticisms?