USART TX Interrupt problem. (DT_INTS)


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: USART TX Interrupt problem. (DT_INTS)

    OK then,

    This puts a byte at location 50 (dec) in ram
    Code:
    String_1    VAR BYTE 50       ' Array to hold string.
    this puts array of 50 where PBasic puts it
    Code:
    String_1    VAR BYTE  [50]             ' Array to hold string.
    this puts array of 50 at location $100, (100hex, 256 dec)
    Code:
    String_1    VAR BYTE  [50]              $100     ' Array to hold string.

    At the bottom of the generated LIST file is a listing of the mem locations for ram and prog mem
    there you can see the var's location and alotted space left between arrays.

    Name:  Capture2.JPG
Views: 644
Size:  120.8 KB

    Don
    Last edited by amgen; - 16th August 2011 at 14:39.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: USART TX Interrupt problem. (DT_INTS)

    That's it, thank you!
    It was all in the declaration, I had forgot the brackets!

    Can't belive I didn't think of that - the number of times I've been there and changed the value and missed the missing brackets. Guess, since it worked with an imiginary lenght of 50 it was harder to see.

    Thanks again!

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: USART TX Interrupt problem. (DT_INTS)

    that will be $1 or cup of coffee or credit for my future dumb stuff

    don

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: USART TX Interrupt problem. (DT_INTS)

    Henerik, Why are you using HSEROUT when you have the interrupt all setup?
    Dave Purola,
    N8NTA
    EN82fn

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: USART TX Interrupt problem. (DT_INTS)

    Because the interrupt messed up my array of data and the HSEROUT statements helped me show what was going on. Which turned out to be that I hadn't declared the array properly.

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: USART TX Interrupt problem. (DT_INTS)

    Yeah, I understand that but, Why don't you just load the array with your message and then enable the interrupt? You have the code there already.. The interrupt will disable it when the message is sent... I have used this methode for the last few years but not with the ARRAYREAD or ARRAYWRITE statements... Just loose the HSEROUT stuff.... THat way it's all done in the background...
    Dave Purola,
    N8NTA
    EN82fn

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: USART TX Interrupt problem. (DT_INTS)

    Dave,
    That was the purpose all along and that is exactly what I did - but it didn't work, it just gave me garbage as you can see in my first post. So I added the HSEROUT statements to help debug the problem which, again, was my erronous array declaration. Now when teh problem is found and fixed the HSEROUT statements are gone.

    The code isn't "production code" it's code to illustrate the problem I had with the interrupt routine corrupting my array.

    /Henrik.

Members who have read this thread : 0

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