Hi,
may need a different pointer for TX int if you are using that one for HSER also. I think they will get intertwined !?
don
Hi,
may need a different pointer for TX int if you are using that one for HSER also. I think they will get intertwined !?
don
Thanks don,
I was actually trying some things with regards to your latest thread when I stumbled across this.
You have a good point. However, I don't think different pointers will make any difference in this case. Here's the reason(s) for my statement.
1) I have a Pause 500 after enabling the interrupt, that's more than enough to send the string out. This means that TXPointer is free to use when "test 4" begins.
2) If that was the case then the size of the array wouldn't matter. Note that I'm not changing the amount of data actually written to the array, I just change the declared size of it. 50 works, 100 doesn't.
3) When test 5 is executed it shows that the actuall content of the array is changed. I forgot to mention this is in first post but I initially used another pointer variable (not TXPointer) in Test5 and it gave the same result as when using TXPointer - ie, it shows that the array is corrupted.
/Henrik.
OK then,
This puts a byte at location 50 (dec) in ram
this puts array of 50 where PBasic puts itCode: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] ' Array to hold string.
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.
Don
Last edited by amgen; - 16th August 2011 at 13:39.
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.
that will be $1 or cup of coffee or credit for my future dumb stuff
don
Henerik, Why are you using HSEROUT when you have the interrupt all setup?
Dave Purola,
N8NTA
EN82fn
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.
Bookmarks