MSP430G2的LaunchPad是昨天收到的,做工很不错!晶振的问题有点麻烦,焊上去不好取,取下来不好焊(贴片滴)。随手找了个普通的32768晶振调好脚距插上去,按照文档中的方法验证okay,uart的实验也没有问题。大家可以试试呵呵。
验证的方法为在CCS中创建一个新工程,把附件中的代码粘贴到新增的main.c文件中。下载并运行。如果红灯(LED1)以约1秒1次的速度满闪则晶振没有问题,如果以约1秒10次的速度快闪,则晶振连接不正确。
原文: Verify Crystal is Operational 2. Create a new project (File Æ New Æ CCS Project) and name it Verify_Crystal. Uncheck the “use default location” box. Using the Browse… button navigate to: C:\MSP430_LaunchPad\Labs\Lab2\Project-VC. Click OK and then click Next. The next three windows should default to the options previously selected (project type MSP430, no inter-project dependencies selected, and device variant set to MSP430G2231). Use the defaults and at the last window click Finish. 3. Add the source file to the project by right-clicking on Verify_Crystal in the C/C++ Projects window and select: New Æ Source File or click: File Æ New Æ Source File Name the source file main.c and click Finish. An empty window will open for the main.c code. Next, we will copy the source file for the demo and paste it into main.c. 4. In the empty window add the code for main.c. by: Click File Æ Open File… and navigate to C:\MSP430_LaunchPad\Labs\Lab2\Files. Open the Verify_Crystal.txt file. Copy and paste its contents into main.c. Then close the Verify_Crystal.txt file – it is no longer needed. Be sure to save main.c. 5. Click the “Build” button and watch the tools run in the Console window. Check for errors in the Problems window. 6. Click the “Debug” button (green bug). The “Debug Perspective” view should open, the program load automatically, and you should now be at the start of Main(). 7. Run the code. If the crystal is installed correctly the red LED will blink slowly. (It should not blink quickly). If the red LED blinks quickly, you’ve probably either failed to get a good connection between the crystal lead and the pad, or you’ve created a solder bridge and shorted the leads. A good magnifying glass will help you find the problem.
[ 本帖最后由 elulis 于 2011-1-19 04:38 编辑 ]
|