Forgot to reset RTCC in Interrupt causes big trouble
Oliver H. Bailey
Posts: 107
Hello Everyone,
I was using the SXSIM for developing code to support my current book and forgot to reset RTCC in a timer interrupt. SXSIM went bannas and sucked up almost 97% of the CPU on my XP box. Even the task manager couldn't shut it down so I had to kill the process. That's a great educational tool in making old guys like me remember. Once I fixed resetting the RTCC value everyone worked as it should. I did get te error that RTCC overflowed but by that time it was not possible to use the quit key or close box. Ijust thought I would share that experience. Even with that SXSIM is a great tool.
Regards,
Oliver H. Bailey
I was using the SXSIM for developing code to support my current book and forgot to reset RTCC in a timer interrupt. SXSIM went bannas and sucked up almost 97% of the CPU on my XP box. Even the task manager couldn't shut it down so I had to kill the process. That's a great educational tool in making old guys like me remember. Once I fixed resetting the RTCC value everyone worked as it should. I did get te error that RTCC overflowed but by that time it was not possible to use the quit key or close box. Ijust thought I would share that experience. Even with that SXSIM is a great tool.
Regards,
Oliver H. Bailey
Comments
thanks for your information about your problem with SXSim. I'll try to reproduce this problem, and fix it in the next version.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Bean is right the simulatror will quit depending on how large the overflow is. By the way Gunther, I was able to run a program created with CCS Scenix C in the simulator even though there was no org statement. The IO panel also worked. I cannot however get the SXKey 3.1 to download the hex or lst file to the device. (Ken, are you listening?). Gunther, if you have any problems re-creating the problem I'll email you the file(s).
Regards,
Oliver
So, you compiled a program with CCS and it made a hex or lst file which the IDe had a problem with, or did you load the source it made and the IDE assembled it and couldn't get the file to the device?
Thanks, PeterM
I was able to load the lst file into the SXSIM and run it. I can't the IDE to allow me to download the hex file as it want's source code in either assembler or SX/B. I looked for the information to pass the hex file down via the SX-Key as I am told this use to work but the SX-Key 3.1 won't hear of it. Without the protocol or the ability to download a non-parallax generated hex file I am really struck. Any ideas on where the protocol information is to allow a hex file to be downladed?
regards,
Oliver H. Bailey
My experience with the CCS compiler (version 3.223) is that it is incompatible with the current SX IDE. There are some funny work-arounds with manually loading a hex file that finally let you get it sort-of working; it's reallt tough to get the debug code window open.·There is·some better compatibility with older version IDE's, but certainly not complete.
See the posts in this forum by krudko of 9/13/2004 regarding this issue........ there has been no real improvement by CCS in the last year.
Help requests simply responded by "go talk to Parallax". Great!
It truly is a super buggy compiler that is intended for a PIC, and does not compile well onto an SX platform. I'd LOVE to send it to PJ to see if he would know how to make the IDE compatible, but for the few (dozen?) or so out there it's probably not worth it.
Just my obsevations on how to throw a few hundred dollars down the drain.
Peter (pjv)
Post Edited (pjv) : 9/19/2005 4:45:53 PM GMT
Regards,
Oliver Bailey
Good luck on having CCS do anything about the incompatibility. Over one year of whining, I see no significant improvement so far. One just gets tired of it. You'll be a much better man than I am if you succeed at that.
But of course one can load a CCS compiled hex file via the IDE "LOAD HEX" button under the DEVICE command. Just be ware of the results the compiler provides....LOTS of bugs.
I reiterate that while C may be your language of choice, with this particular compiler, it is totally inappropriate for doing anything but the most rudimentary work in an SX 28, although the SX 48/52 fares somewhat better. And if the work is rudimentary, then who needs C?
With anything substantial, especially if FP math is involved, it is next to useless.
Just my rather biased opinion.....
Cheers,
Peter (pjv)
I have had several careers in my life starting as a mold designer, moldmaker, software engineer, electronics engineer and even some chemical engineering and metallurgy are thrown in. Sadly, my views got corrupted (from an engineering view) when I went into engineering management and senior engineering menagement. From a management view I got enlightened, from an engineering view corrupted. The fact is I added a new view to engineering. Having come from mechanical enginnering disiplines was the best background I could have hoped for when moving into software and electronics. It allowed me to apply self-displine to an abstract form of engineering. In short it eliminated the ned for UML diagrams because they are simplified blueprints in the mechanical field (and very high level blueprints at that). I use Parallax products in my writings for several reason but the biggest two are 1) Reliability - If they sell it, it works or they fix it no questions, and 2) Support. (The electronics industry would be much better off using Parallax support as a benchmark). As a businessman I think the SX chips have years of life in them supplementing the microcontroller industry. They are simply so fast they allow things to be done in firmware that few other processors can do in hardware. My first introduction to Scenix was in developing caller ID devices for the telephony industry over 10 years ago. I hear of lot of comments from people (as an author) about specific langugaes and companies that make those languages. Having written compilers in my early days in the industry (which go back to the TRS-80 Model I), I can say first hand that compiler writing is no easy task. It takes a special person, with a special view, and a love of assembly and machine language to write, maintain, and maintain a working compiler. I think SX Basic will evolve into a very useful tool. But I also believe that for a seasoned chip such as the SX a good C compiler is a must just to maintain market share of the hardware. Guys, I can write a C program in 1/10 the time I can write it in Assembler. SX/B is in the early stages of development. It will take time for it to evolve because proper evolution takes time. Prior experience leads to future success and that is very true in compilers when writing the next generation. A good compiler author knows that the IDE, Assembler, and even the economy of tight code generation make a successful product. I personally believe that a strongly supported and used C compiler for the SX will increase the number of chips sold and actually promote the SX/B compiler as well. SX/B appears to be, from my expereince a very quick route to writing assembler using BASIC syntax. Who could ask for more. Those are my closing thoughts and comments on this thread I started a couple days ago.
Regards,
Oliver H. Bailey