The last file is example.cla. It is the C Code for the CLA implemented as a series of tasks. The CLA compiler recognizes the extension.cla and knows that it needs to compile this code into CLA assembly. The last file is a linker command file, 28069RAMCLAlink.cmd. This is also part of Control Suite. /. Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press 'Run' button to compile and execute it.
Active7 years, 4 months ago
I have a PIC 16F887A connected to the serial port. I want it to lit a green led when it receives 0x01 and lit a red led when it receives 0x00 from pc. I send the characters from a C# windows forms application, the PIC itself is programmed with CCS C. Can you please tell me what i'm doing wrong as the codes below don't work?
Edit: By doesn't work i mean it lits the red led in both cases.
C# Code
CCS C Code
OmertaOmerta
1 Answer
If it receives 0x00 in both cases, it is likely that you have a baud rate mismatch, even a slight one. After detecting a start bit, the PIC might be seeing the first 7 zeroes and think it saw 8, going you 0x00 in both cases. I would try transmitting from the PIC and PC and watching the lines on a scope to ensure they are running the same speed. You can also try continuously transmitting 0xAA to get an eye pattern (10101010) and comparing the two signals.
Nathan WiebeNathan Wiebe