#149 USART problems with pic16f690

None
closed-invalid
Roy Rankin
None
5
2013-07-26
2013-01-14
Dan Hatch
No

I'm experiencing issues with getting the USART to work when using a pic16f690. I've tried with other chips (pic16f877) and it seems to function fine with the code I'm using (albeit with the pins swapped). I've also managed to (borrow and) load the output onto a windows box with MPLAB SIM running and it seems ok on there too.

All I'm trying to do is set up the usart on the chip and transmit a few characters. No receiving.

I've attached the assembler that's been produced in case it's useful!

Discussion

  • Dan Hatch
    Dan Hatch
    2013-01-14

    Oops, forgot to say that the version of gpsim I'm using is 0.26.1.

     
  • Roy Rankin
    Roy Rankin
    2013-03-18

    Dan,

    A problem in the gpsim usart code has been fixed. I have hacked (very crudely) the supplied assembler file so it can be compiled with gpasm and it seems to transmit OK. Can you retest using the latest code in the SVN and report the result.

    Roy

     
  • Roy Rankin
    Roy Rankin
    2013-06-30

    Dan,

    I did not see forum entry sooner.

    Were you logged in to sourceForge when you went to the bug? When I am logged in there is a box at the bottom of the bug for new comments.

    If it is a help my test program can be found in the SVN under regression/p16f690/eusart.asm. The first thing to check is for a baud rate issue.

    If you attach the .cod or .hex file and .stc if you are using one to the bug, It might help me work out the issue. Let me know if you have issues doing that.

    Roy

     
  • Roy Rankin
    Roy Rankin
    2013-07-26

    Was user issue with CPU clock speed wrong causing a baud rate issue

     


Anonymous


Cancel   Add attachments