Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC 16f877A interrupt code problem - HELP!!!

Status
Not open for further replies.
hi Andrew,
Its taken ages to even to get it to assemble in OS.

The program is full of errors.:(

I think the easiest solution is that you write a short diagnostic program for the UART and ISR and post that...
 
Hello Eric,

Apologies for that one. The code, apart from the error I have just stumbled across seemed to work fine. MPLAB compiles ok. I will take your advice and write a short routine.

Andrew:eek:
 
Hello Eric,

Apologies for that one. The code, apart from the error I have just stumbled across seemed to work fine. MPLAB compiles ok. I will take your advice and write a short routine.

Andrew:eek:

hi,
Are you aware that the OS BASIC compiler creates an *.asm file.?

If you can write a simple program using OS Basic and then look at the asm file, it will give you a good idea of whats needed.
 
Hello Eric,

An update.....

Wrote a diagnostic utility as you suggested. Definately worth the time doing so. I got the code to send a stream of data out but it was coming out garbled????? Another head scratcher again.

This time went around the development board with a scope and found that the actual data coming out of the PIC was good but not on the solder connection on the relevant pin of the DIL socket. The TTL level was in the indeterminate region. The joint looked as expected so removed the PIC, cleaned the DIL contacts and bingo, code ran perfectly (the last file I attached....contaminated DIL socket. I was using the scope while debugging the problem previously but was focusing soley on the RX pin. Big lesson learned there.:eek:

Interestingly I loaded the code into the OS Assembler and it came up with 31 errors. I am not sure why but the code it flags as incorrect would cause all sorts of problems during PIC execution.

Anyway, I could not see the wood for trees and suggesting that I write a diagnostic routine was an excellent pointer although blatently obvious. The utility and the trouble I had at the start of the thread has all gone away.

Would like to thank everybody that took the time to reply :)
 
Last edited:
hi Andrew,
Good news,

As you are OS user, if you look at my Forum Blog, there are a few external modules you may find useful. pages 2 and 3
 
Last edited:
No. I'm a different world away from most of the PIC's and it's many environments. But micros are micros. They're all capable of similar tasks. I know this is mainly a PIC forum but I just like the folks I have met on here. Most seem to be pretty good eggs! And its a good place to hang out and try and help every now and then. And I have learned a few things here and there on the site as well.;)..Im just in at work today trying to get a circuit card layed out and need to turn away from it now and then so I don't go cross eyed:rolleyes:
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top