Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why the code is printing UART2 OK... everytime I enter some data?

Status
Not open for further replies.
Advanced Member level 6
Joined
Dec 4, 2012
Messages
4,280
Helped
822
Reputation
1,654
Reaction score
791
Trophy points
1,393
Location
Bangalore, India
Visit site
Activity points
0
I am attaching my project files. I want to know why this is behaving strangely. The problem I am facing is the data is not being written to SD card and whenever I enter some data through UART it prints "UART2 OK..." which should not happen. Only data should be written or appended to SD card if data delimiter "TX" is received within 10 characters or if characters are more than 10.

I am testing in both hardware and Proteus.


Edit: I have even fixed the two mistakes that is removed the ISR and also the semi colon at the end of if() statement but still the same problem.

The same code works fine when used with PIC18F452 (Only changes is UART1 and SPI1 are used).

99838d1387075584-test.png
 

Attachments

  • test.png
    test.png
    47.5 KB · Views: 73
  • SD Card and UART Test.rar
    263.4 KB · Views: 89
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top