-
Content Count
106 -
Joined
-
Last visited
-
Days Won
37
Blog Comments posted by N9WXU
-
-
Comparing raw pin toggling speed between Arduino platforms.
in Toe-to-toe
A group blog by Microforum Staff
More Data!
I just got a Teensy 4 and it is pretty fast.
Compiling it in "fastest" and 600Mhz provides the following results.
Strangely compiling it in "faster" provides the slightly better results. (6ns)
This is pretty fast but I was expecting a bit more performance since it is 6x faster than the Teensy 3.2 tested before.
There is undoubtedly a good reason for this performance, and I expect pin toggling to be limited by wait states in writing to the GPIO peripherals. In any case this is still a fast result.
-
1
-
-
Getting Started in Embedded Programming Pt 5
in What every embedded programmer should know about ...
A group blog by Microforum Staff
That is covered!!!
As explained in the article and demonstrated in the 5'th listing, printf is setup by the putch function.
Of course I did not do something as mundane as Hello, world!, but I did produce floating point values for the graph.
-
Getting Started with Embedded software Pt 2
in What every embedded programmer should know about ...
A group blog by Microforum Staff
Standby for a introduction to embedded... the ASM version.
But suffice to say, the PIC assembler (MPASM) does understand #define for creating macro's just like in C.
Setting breakpoints works the same way as in C but it is a bit more clear because you can set the breakpoint on exactly the instruction you want to stop at.
The biggest hassle with ASM programming is the lack of any kind of support anything not supported by the ISA.
-
Using : Extern "C"
in What every embedded programmer should know about ...
A group blog by Microforum Staff
Fantastic. I "unfortunately" remember those olden days of writing DLL's for use in Windows 3.1. One of my first JAVA experiences was writing a DLL to call a JAVA program to access hardware for an embedded system. There is a long list of things that don't "quite" work the same in C++ and C, never mind the differences between the different revision.
-
Getting Started with Embedded software Pt 2
in What every embedded programmer should know about ...
A group blog by Microforum Staff
Here is the advanced course version in assembly language
bank0 udata delayLow res 1 delayHigh res 1 RES_VECT CODE 0x0000 ; processor reset vector GOTO START ; go to beginning of program MAIN_PROG CODE ; let linker place main program #define delayValue 10000 go_slow banksel delayLow movlw low delayValue movwf delayLow movlw high delayValue movwf delayHigh slow_loop decfsz delayLow goto slow_loop decfsz delayHigh goto slow_loop return START BANKSEL TRISA CLRF TRISA loop BANKSEL PORTA BSF PORTA,2 call go_slow BANKSEL PORTA BCF PORTA,2 call go_slow GOTO loop END
It works exactly the same way as the C version.
-
Getting Started with Embedded software Pt 2
in What every embedded programmer should know about ...
A group blog by Microforum Staff
The defaults worked just fine! Of course there may have been a watchdog timer occurring someplace.
-
Using the MPLAB-X Simulator to debug UART code
in What every embedded programmer should know about ...
A group blog by Microforum Staff
If you experience strange behavior with MPLAB double check your simulator stimulus files for bad syntax. I just created a stimulus file for a blog post that will hit tomorrow morning. I inadvertently placed two sequential quotation marks at the start of a string. like this:
""lots of stuff to send"
As soon as the simulation was started, MPLAB went into the weeds. Some stuff could be clicked on, but in the end I had to kill the process and restart. Only by checking everything with a second pair of eyes was the problem detected.
-
This brings back memories. As I developed as a programmer, the role of Mel (and his suitability as a role model) has also shifted. Of course we all strive to be Mel when we start out. The idea that we have such in-depth knowledge of our system that we can create the tightest possible code and take advantage of the most esoteric of "features" seems like the epitome of super programmers. Of course as I matured, I learned that this knowledge was incredibly powerful and certainly the ability to use it was an asset but like the old saw, "with great power comes great responsibility". Today, I think the best analogy would be "absolute power corrupts absolutely". I would love to manage a software team with the knowledge and experience of Mel, but I would hate to manage Mel, because in the end, he would cost me a huge amount in future maintenance costs as only another Mel + lots of time could possibly support his work and no program ever survives contact with the users so the inevitable new feature would be a disaster.
That aside, be sure to read the detailed explanations. They are as fascinating as the original story.
https://jamesseibel.com/the-story-of-mel/
-
1
-
Comparing raw pin toggling speed between Arduino platforms.
in Toe-to-toe
A group blog by Microforum Staff
Posted
Hey, I just noticed that there are some over-clock options.
Here is the result when clocked at 960MHz. I could not get it to run at 1GHz. They did warn that cooling was required.