??? 11/21/06 23:10 Read: times |
#128387 - More comments Responding to: ???'s previous message |
Mahammed, I put some critical notes in my code - did you do the necessary research to answer these? You seems to have used my code blindly - why does it not work? Firstly - I asked you to verify the byte order your assembler uses for .DCW, you're now using .DCI, did you verify the byte order? High byte first or low byte first? My code assumes low byte first -if your assembler does it the other way then you will get strange results - you can check this in your simulator easily. The other question is the order that you read/write the CCAP0 registers - is this critical? I don't have the PCA data at hand, so I can't verify this.
My example code does not stop - again, I added comments for you to provide the end conditions. As Erik mentions - comments are critical for your code otherwise is is a sea of instructions. Get into the habit of adding some comments that explain what is happening. Please don't think that just because I'm experienced that I can solve your problems. Experience teaches you to avoid problems from the beginning! |