Maker Pro
Maker Pro

Arduino vs raw PIC, Atmel etc

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
Hi Steve - I meant that since the architecture of the two chips are different writing code for Arduino - taking that hex and trying to burn it onto a pic would not work.
That goes without saying. You must have misunderstood me somewhere along the line. I never said anything like that.

So now I'm totally confused. o_O
What did you mean when you said this:-
chopnhack said:
What I was going to suggest was using the hex output. I have done that with JAL to a PIC instead of ASM or C
I thought you meant the Arduino hex, directly to an ATMega chip in theArduino board. Is that what you were saying?
Hence my earlier questions. (Can you possibly help with them, or am I barking up the wrong tree?)
And also regarding uploading a hex file to an Arduino, I found an alternative method in lieu of answers to my questions, using a little program called XLoader. (If it works.) I downloaded it, but it wouldn't run on my old XP machine initially. I had to install the .net4 framework first. It works now, so I'll give it a go when the Arduino arrives.
 
Last edited:

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
That goes without saying.
I thought as much, but it never hurts to state the obvious lest it get overlooked - I've done it(overlook).

Re: arduino hex - I should think it would work. I dont know directly, but its logical. Unfortunately I can not answer your other questions, I am one of the newbies around here ;)

Let us know when you get your kit!
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
I thought as much, but it never hurts to state the obvious lest it get overlooked - I've done it(overlook).

Re: arduino hex - I should think it would work. I dont know directly, but its logical. Unfortunately I can not answer your other questions, I am one of the newbies around here ;)

Let us know when you get your kit!
Yeah, it does work apparently. I'm just not sure about whether it can be done using the Arduino software. That's why I hunted and found XLoader. It's intended for the purpose:-

XLoader Screenshot.JPG


Pretty cool, you inadvertently led me to the fact that the Arduino software can output a hex file. :cool:
Thank you for that. I owe you one.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Pretty cool, you inadvertently led me to the fact that the Arduino software can output a hex file. :cool:
Thank you for that. I owe you one.
LOL, broken clock is right twice a day, eh?
Glad to have been of service :D Good luck and keep us posted!
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
LOL, broken clock is right twice a day, eh?
Glad to have been of service :D Good luck and keep us posted!
I'm starting to get it all figured out. Pulled another all-nighter. (Third time in a week.)

Edit: So, I hadn't realised that stdlib.h was available in the Arduino 'sketches'!
I've been floundering along trying to work with only the stuff listed in the Arduino reference pages.
I'm much happier now. I can use the old favourites like C string, strlen(), strcpy(), atoi(), itoa() etc.
They compile fine, at least, but I can't test them in the simulator because it can't handle pointers.
Parsing the output from the Arduino Brain Library will be much easier than I thought, and easier on the Arduino's limited memory.
 
Last edited:

rickselectricalprojects

Feb 1, 2015
118
Joined
Feb 1, 2015
Messages
118
@rickselectricalprojects The Arduino simulator is a bit better than I thought. As I work my way through the pdf manual I'm becoming more and more impressed with it. (The manual is fairly comprehensive.)
http://virtronics.com.au/Data/Simulator for Arduino.pdf

I didn't think it had a very good way of taking stimulus input, but it does. From a stimulus file, it can take any Arduino command as input stimulus, with a parameter in uS telling it when to process the stimulus. Makes it a little more like the MPLAB simulator that I'm used to, but better in that regard.
Really good for debugging string handling routines, too, since the results can be displayed in the input/output window using Serial.print() and Serial.println(). The more that I use it, the happier I am that I forked out the $18. (I'm making a list of bugs that I come across, to send to the maker for possible future bug fixes.)
One more that I found is that when testing a small library that I wrote yesterday, the simulator didn't process multiple statements on one line. Might just be a problem with libraries. Gotta check into it some more today.
will the arduino simulator work on windows 8.1?
even though i have an arduino i think it would be fun to play around with it.
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
will the arduino simulator work on windows 8.1?
even though i have an arduino i think it would be fun to play around with it.
I can't answer that Rick, sorry. I'm living in the past, running XP SP3, and it works on this OS.
Neither the website nor the datasheet mention which versions of Windows it works with.
You could contact them via the website, here: http://virtronics.com.au/contact , or alternatively you could download the free version and try it, I guess. Since it is so buggy, it's a good idea to try the free version before buying it anyway, I reckon.

I keep running into problems with it, since it has poor library handling and no pointer handling, so have changed my opinion and aren't so happy with it any more, now that I'm writing most of my Arduino code in C / C++. I've almost completely given up writing in the Arduino language. Most of what I'm writing won't run in it. I hope they hurry up and develop it further.
I have a growing list of problems that need fixing. I'll email to him soon, when I've covered everything that affects me the most.
 

rickselectricalprojects

Feb 1, 2015
118
Joined
Feb 1, 2015
Messages
118
I can't answer that Rick, sorry. I'm living in the past, running XP SP3, and it works on this OS.
Neither the website nor the datasheet mention which versions of Windows it works with.
You could contact them via the website, here: http://virtronics.com.au/contact , or alternatively you could download the free version and try it, I guess. Since it is so buggy, it's a good idea to try the free version before buying it anyway, I reckon.

I keep running into problems with it, since it has poor library handling and no pointer handling, so have changed my opinion and aren't so happy with it any more, now that I'm writing most of my Arduino code in C / C++. I've almost completely given up writing in the Arduino language. Most of what I'm writing won't run in it. I hope they hurry up and develop it further.
I have a growing list of problems that need fixing. I'll email to him soon, when I've covered everything that affects me the most.
i would get it but i don't really need it as i have about 5 arduino boards.
don't worry about giving up on learning the arduino language because there is so much support and so many sketches available on the internet. as long as you know the basics of the code you should be fine.
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
No mate, I won't give up altogether on the Arduino language. I've been studying 'Processing' at the same time, but have still managed to pick up a fair bit of the Arduino stuff already. Some of the Arduino classes are well worth using, and there are some pretty useful commands that are worth using for simplicity like those for pin access etc. I actually only bought the Arduino so I could use a lib that I didn't want to re-write for PICs.
Most of my Arduino code will be in C / C++ though, for efficiency and speed.

And re the simulator, the more I use it the more it p@#$es me off that it doesn't have pointer support. About 90% of my sketches will use pointers.
I emailed Virtronics the other day, asking if pointer support is to be added in the near future. I'm hoping that if enough people ask, they might fire up and address this problem sooner.

On the topic of 'Processing', too, I noticed that it's IDE is almost identical to that of Arduino. I guess Arduino was written using Processing, or maybe originally created by the same people. Both use 'sketches', as well. See any similarities? :-

Processin vs Arduino.JPG
 
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,880
Joined
Jun 21, 2012
Messages
4,880
I think I read somewhere (probably in the Arduino documentation) that the Arduino IDE was written in Java. One of the IDEs for Processing is also based on Java. There are two other Processing IDEs based on JavaScript and Python. See this link for more information on Processing.

Almost on topic, I attended the Thursday Night B-Road meeting of the Dayton Amateur Radio Association (DARA) tonight after an absence of several months. The last meeting I attended was devoted to learning how to write Arduino Sketches. Then along came a diversion into learning how to program PICs that lasted several months and kept me away from the weekly B-Road meetings. So tonight I decided to see what was going on with the group in my absence.

Turns out the group is going strong and is involved with all manner of projects, some related to amateur radio, some not so much. I got to see the new hot-air soldering station in action and was impressed with its performance (considering how inexpensive it is). The club also has purchased a HUGE tool box filled with all sorts of goodies for members to use, and has continued to fill up the work benches with donated test equipment. Not quite to the point that I am willing to drive eleven miles across town every day just to use it, but the camaraderie once a week is welcome.

The ham who was presenting the Arduino classes earlier this year had some sort of Motorola UHF transceiver opened up on a bench and had attached an Arduino Nano and some sort of two-line back-lit LCD display to it with a dozen or so wires soldered to the circuit board inside the transceiver. He said he had to "cut a few traces" to make it happen. Of course I asked him for an explanation and he pointed to some tiny surface-mount IC with about fifty or so connections on four sides of it that he said was a microprocessor. I didn't ask what kind (and I couldn't read the part number) but he said the Arduino Nano was now performing all the functions of the transceiver's microprocessor. He proceeded to demonstrate, then said there was more programming to do on his laptop. A work in progress, which most home-brew ham activity turns out to be. Always room for improvement.

I noticed he did not connect his laptop to the Arduino Nano to download and test his program, so I asked him if he was running an Arduino emulator on the laptop. Blank stare. It had not occurred to him that he didn't really need the Motorola transceiver or the Arduino Nano to test his code. And were it not for the posts that @Old Steve has been making here, I could not have informed him that an Arduino emulator was available for less then twenty bucks.

So now I guess I gotta get me one of those... and also see what all this Processing noise is about. From the looks of it, Processing is designed to lure the artsy-fartsy crowd into computer programming. Should I tell my wife about it? Nah, not this year. She just informed me that if I won't buy her a 3D printer, I should at least get her a 3D pen, which is apparently some version of a hot-glue gun on steroids with spools of plastic thread instead of glue sticks. About fifty bucks, which sure beats the cost of a 3D printer, and appears to be quite "creative" without a byte of software anywhere in sight. Hmmm. I wonder if this could be combined with mind control to create mind-blowing art?

Hop

Oooh, @Old Steve I like your new avatar.
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
I think I read somewhere (probably in the Arduino documentation) that the Arduino IDE was written in Java. One of the IDEs for Processing is also based on Java. There are two other Processing IDEs based on JavaScript and Python. See this link for more information on Processing.

Thanks for that link. Interesting to read the history. And not just the 'Processing' IDE is written in Java. The whole 'Processing' language is Java-based, as I've learned. Much like the Arduino language is C/C++-based.
I had to get some help from the Processing forums in writing a bargraph display to display the decoded serial stream of EEG packets from the Mindflex headset, and part of the code written by the guy that helped me was pure Java, such as the keyword "final", and all compiles perfectly in Processing. ('final' isn't mentioned in the Processing reference.)


Almost on topic, I attended the Thursday Night B-Road meeting of the Dayton Amateur Radio Association (DARA) tonight after an absence of several months. The last meeting I attended was devoted to learning how to write Arduino Sketches. Then along came a diversion into learning how to program PICs that lasted several months and kept me away from the weekly B-Road meetings. So tonight I decided to see what was going on with the group in my absence.

Turns out the group is going strong and is involved with all manner of projects, some related to amateur radio, some not so much. I got to see the new hot-air soldering station in action and was impressed with its performance (considering how inexpensive it is). The club also has purchased a HUGE tool box filled with all sorts of goodies for members to use, and has continued to fill up the work benches with donated test equipment. Not quite to the point that I am willing to drive eleven miles across town every day just to use it, but the camaraderie once a week is welcome.

The ham who was presenting the Arduino classes earlier this year had some sort of Motorola UHF transceiver opened up on a bench and had attached an Arduino Nano and some sort of two-line back-lit LCD display to it with a dozen or so wires soldered to the circuit board inside the transceiver. He said he had to "cut a few traces" to make it happen. Of course I asked him for an explanation and he pointed to some tiny surface-mount IC with about fifty or so connections on four sides of it that he said was a microprocessor. I didn't ask what kind (and I couldn't read the part number) but he said the Arduino Nano was now performing all the functions of the transceiver's microprocessor. He proceeded to demonstrate, then said there was more programming to do on his laptop. A work in progress, which most home-brew ham activity turns out to be. Always room for improvement.

I noticed he did not connect his laptop to the Arduino Nano to download and test his program, so I asked him if he was running an Arduino emulator on the laptop. Blank stare. It had not occurred to him that he didn't really need the Motorola transceiver or the Arduino Nano to test his code. And were it not for the posts that @Old Steve has been making here, I could not have informed him that an Arduino emulator was available for less then twenty bucks.
I haven't tested the Arduino simulator running a sketch that uses serial input yet, only it's built-in serial monitor. That works fine. (The only serial monitor I've seen that allows the screen to be cleared. Neither HyperTerminal nor the Arduino serial monitor allow this.)
I'll get around to testing an Arduino sketch with serial input in the simulator pretty soon. I'm hoping that aspect of it works well.

So now I guess I gotta get me one of those... and also see what all this Processing noise is about. From the looks of it, Processing is designed to lure the artsy-fartsy crowd into computer programming. Should I tell my wife about it? Nah, not this year. She just informed me that if I won't buy her a 3D printer, I should at least get her a 3D pen, which is apparently some version of a hot-glue gun on steroids with spools of plastic thread instead of glue sticks. About fifty bucks, which sure beats the cost of a 3D printer, and appears to be quite "creative" without a byte of software anywhere in sight. Hmmm. I wonder if this could be combined with mind control to create mind-blowing art?
Processing is the easiest way that I know to take serial input and produce graphics based on the incoming data, like my bargraph.

BrainWaveGraph.JPG

Oooh, @Old Steve I like your new avatar.
Ha. Of course, that's not a recent pic of me - it's one of Mum's baby photos, from shortly after I was born. I'll use a more recent pic next time I change my profile photo.

Edit: A 3-D printer would be great. I'd love one. Maybe when they get as cheap and common as ink-jets.
And I hadn't thought of brainwave-driven art. You might be onto something there.
 
Last edited:
Top