Oops, absolutly correct. I messed that one up by a factor of 10, sorry for the confusion.
Oops, absolutly correct. I messed that one up by a factor of 10, sorry for the confusion.
Don't worry about it - I made a similar error on the MC forums this morning. Need to remember to get my morning cup of coffee first.![]()
Thank you guys for such a quick response. And thanks for pointing out that error with the resume instead of a return, must have been out of my mind!
Also, I would like to ask, if what i posted there is the right way of storing in an array?
is it like:
"arraystore[i] = newdata?"
as for the timer base, i will still have to dig deeper into using interrupts and timer1 function..
Any extra advices or pointing out of co-existing codes that I could look up to will be appreciated!
Hi,
Your array code seems OK to me, like:
The absolute easiest way to get started with interrupts is to use Darrels Instant Interrupt routines, they're available on his website. Have a look at the "timer template" - that might be a good starting point for your application.Code:myArray VAR Word[3] 'Create an array of 3 words. i VAR byte For i = 0 to 2 myArray[i] = 12345 'Store the value 12345 in array locations 0, 1, and 2 NEXT
/Henrik.
thanks for your reply! Now, I'm actualling trying to use the SPI capabilities of the 16F88 that will be connected to an arduino. To my understanding, when data is transfered, it is in <binary>? but my questions is, in my programming compiler, do i use the same keywords with the values needed so that the master/slave can communicate?
I am trying to understand, how is it that I can tell pic A to send this array of information (say a Keypad Code Input of 1,2,3,4) and send it to pic B who is the slave, which then will do something else, and returns a high value or confirmation to pic A that code is verified -> please do this, this and this...
My professor just tells me about it being sent across as data on the same baud rate/frequency but i dont understand how this 2 diff pics can understand diff languages..
Any explanation at all, would be greatly appreciated! this forum definitely has really talented and helpful forumers!
I may not be much better than your professor but...
It is not really two different languages. Pretty much anything serial is just a series of highs and lows (0 and 1), sometimes the standard will be for a swing from a negative to a positive, still look at it as high and low.
The different Operating Systems are sending/receiving the same type of signal. The device sending converts the data into the correct format.. clock timing, and data. The receiving machine will have code to convert this back to something useful.
So the code on each machine may be in different languages, but they are doing the same thing. You might think about this in internet terms, HTML. Cross platform because the code generating the data and the code interpreting the data both "understand" the HTML.
This might help some.
http://en.wikipedia.org/wiki/Serial_..._Interface_Bus
Sorry if I confused things more. Or was not any help at all.
Dave
Always wear safety glasses while programming.
Bookmarks