Morse code reader compiles but won't run


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009
    Posts
    3

    Default Morse code reader compiles but won't run

    We have a club project to read morse code from a speaker and display it on an LCD . The code compiles without error but won't run. I have used MPLBAsim but can't get it to work. It is coded for an 16F84 at 4 MHZ and a Hitachi LCD. Need some help. I have attached the code as text Morse2.txt
    Attached Files Attached Files

  2. #2
    timmers's Avatar
    timmers Guest


    Did you find this post helpful? Yes | No

    Wink

    __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _HS_OSC
    ; timing based on 1.12MHz RC oscillator configuration using 5.1Kohm + 100pf

    Hi there,
    Your first problem is you've defined a high speed oscillator but have an RC circuit connected instead.

    Change your config line to

    __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _RC_OSC
    ; timing based on 1.12MHz RC oscillator configuration using 5.1Kohm + 100pf

    For time critical applications a ceramic resonator or crystal is much more reliable. Dont forget the load capacitors for the crystal!

    Tim.

  3. #3
    Join Date
    Apr 2009
    Posts
    3


    Did you find this post helpful? Yes | No

    Default reply

    I figured that I should get something out of the chip even with a 4MHZ xtal. But I guess it throws all the timing off, even for the LCD. I will make the appropriate changes and get back. I was suprised I couln't get it to run on MPLabSim. It wouldn't even click over 1 cycle. I am a newbie at MPLabSim so I may not have had it set up right. I get an error:
    CORE-W0014: Halted due to PC incrementing over the Maximum PC address and wrapping back to Zero

  4. #4
    timmers's Avatar
    timmers Guest


    Did you find this post helpful? Yes | No

    Default

    Hmmm... gave up with Microchip machine code severeal years ago, -not easy to work with.

    Its allways worth adding an LED to a spare pin, just to give a heartbeat confidence flash, to indicate its doing something.

    Tim.

Similar Threads

  1. decoding quadrature encoders
    By ice in forum mel PIC BASIC Pro
    Replies: 93
    Last Post: - 28th February 2017, 09:02
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  3. Timer PIC16F57
    By leonel in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 1st July 2005, 08:14
  4. Writing code for battery operated projects
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th June 2005, 03:39
  5. Line following robot... problems with some code
    By nepstar in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th March 2005, 01:10

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts