Setting up serial communication between SecureCRT and the C8051 Microcontroller.
1) Install drivers for USB-dual serial port adaptor.
2) Connect USB-dual serial port adaptor to laptop USB port.
3) Open "System" from Control Panel
4) Click "Hardware" tab.
5) Click "Device Manager"
6) Click the plus sign next to "Ports (COM & LPT)
7) There should be at least two serial ports, possibly more
8) The two higher-numbered ones are probably the ones from the dual serial port.
9) Open the Silicon Labs IDE, and create a new file.
10) Save the file as "384test.c"
11) Copy and paste the following code into the window:
#include "c8051.h"
int main()
{
Sys_Init();
printf("\n\n\ntesting...\n");
printf("done for now...\n");
while(1);
}
12) Compile and build the code, connect to the microcontroller, and download the code.
13) Open SecureCRT.
14) Create a new session.
15) Change the Protocol to "serial", and the name to "C8051"
16) Change the port number to the higher numbered COM port from the Device Manager.
17) Uncheck all boxes under "Flow Control".
18) Set Baud rate to 38400, Data bits to 8, Parity to None, Stop bits to 1.
- These should be the default settings, but you never know.
19) Under Category (on the left) click "Emulation".
20) Under Scrollback, change the value in Scrollback buffer to 32000.
21) Click OK.
22) Click "Connect".
23) The Connect dialog box should disappear, and you should see a blank terminal window.
24) Go back to the IDE and run the code.
25) Some text should appear in the SecureCRT terminal window.
Note: Sometimes you will get different serial port values, especially if you use a different serial port adaptor. Therefore, you will have to check the COM port values in Device Manager each time you come in. You do not have to set up a new profile each time though. Instead, you can right click on the profile name (C8051), click "Properties", and change the serial port value to the correct one.