Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

advice on a microcontroller board (and an interface)

Status
Not open for further replies.
I very much doubt any malicious back door code would survive for more than a microsecond in the open source world. There are some majorly smart people who use and maintain that compiler every day. They would definitely find and kill such a thing immediately if it ever managed to get put in the code in the first place (it would never make it that far), and go after whoever wrote the code. What I'm trying to say is, it just wouldn't happen. The compiler can be trusted.


Yes, very true! And in addition, once the compiler spits out the object file, that is all that is going to the micro...

I bet too, that even a seasoned assembly writer would have a tough time producing as small and fast running app as gcc will. :D
 
Thanks a lot for all of you help, Futz and Beebop. It's been extremely useful. My plan right now is to go with the said Phillips board, and I also found an appropriate amp and stereo jack that should be able to provide me with sound.

As far as the compiler, I agree with you to a large extent in terms of what's probable. I think it is probably unlikely that someone would successfully put a bug in the compiler. However, the ultimate goal of this project is to truly reduce the amount of code that must be trusted in a (prototype, example) voting device, and I want to remove the compiler for completeness.

Although the compiler itself is not put onto the board, what is audited is the source code, not the binary itself. In that sense, I argue that the compiler is trusted. You are right that in some sense assemblers suffer from the same problem, but it is also feasible to hand assemble a few hundred instructions. With respect to the compiler's being open source, the argument that bugs are caught only holds if 1) all bugs in the source are caught (which you know of course, and argue is reasonable) and 2) you trust the compiler that compiles the compiler. :) You might read Ken Thompson's Turing award lecture **broken link removed** if you haven't already and are interested.

In any case, you may not agree, but thanks a lot for all of your help.

-Ryan Gardner
 
Ryan, when you say 'hand assemble' do you mean looking up the op code and writing the hex numbers out yourself? I've done this with 6502s and once with a PIC. Even that took forever, and I'd rather never do it again. :p

Thanks for the link to an interesting paper. I quickly perused it, but will read it deeply later.

That is a very nice looking little amplifier module. :)

Edit: Just took a look at some of Diligent's other offerings. Nice little peripheral boards, at good prices. I'd love a little joy stick board to play with. :D I'm going back to browse...

Futz, you gotta check that link out. :D
 
Last edited:
That is a very nice looking little amplifier module. :)

Edit: Just took a look at some of Diligent's other offerings. Nice little peripheral boards, at good prices. I'd love a little joy stick board to play with. :D I'm going back to browse...

Futz, you gotta check that link out. :D
Woo! **broken link removed** All kinds of neat little products and time savers. I like it! :D
 
Last edited:
Ryan, when you say 'hand assemble' do you mean looking up the op code and writing the hex numbers out yourself? I've done this with 6502s and once with a PIC. Even that took forever, and I'd rather never do it again. :p

Yeah, that is what I was referring too. :p I don't want to do it, :) but it could be done.

Glad you guys like the amp and modules.
 
How simple are these sounds? A single transistor and pulsing a piezo speaker would be fine for simple alarms and different tones.
 
You have 2 months, you have no uC experience, you need to program in machine code, and you need to output a .wav file, access an SPI EEPROM and all this other stuff. I hope you are working on this full time.

Assembler specifically means programming in assembler mnemonics. Which is much easier than writing in Hex Machine code, which is what you are stating you are doing.
 
You have 2 months, you have no uC experience, you need to program in machine code, and you need to output a .wav file, access an SPI EEPROM and all this other stuff. I hope you are working on this full time.
I was going to mention that, but didn't want to discourage sknoogleplex. It's a LOT of work and learning if you haven't done microcontrollers before. Good luck with that deadline. :rolleyes: No TV and no weekends or evenings off for you. Nose to the grindstone or forget about it.
 
Last edited:
I appreciate the warning. We'll see how it goes.

I'm not programming in machine code, for the record. Assembly. I was just saying that the fact that one can assemble things by hand provides some justification that you don't have to trust an assembler (at least if you're writing small amounts of code). I will be trusting one. :)

What do you think the hardest part is, interfacing with various pieces of hardware? Where would you start as far as programming some assembly (like flash an led) on the board from a linux devel machine? (link?) What software would you use?
 
Last edited:
I appreciate the warning. We'll see how it goes.

I'm not programming in machine code, for the record. Assembly. I was just saying that the fact that one can assemble things by hand provides some justification that you don't have to trust an assembler (at least if you're writing small amounts of code). I will be trusting one. :)

What do you think the hardest part is, interfacing with various pieces of hardware? Where would you start as far as programming some assembly (like flash an led) on the board from a linux devel machine? (link?) What software would you use?

The hardest part will be learning how to use the micro. :D Yes, I would do the embedded 'hello world,' which is flash an LED.

Well for starters, look up gnuARM software, then check this out. You should also make google your best friend for a while. :D This isn't much; I don't do ARM assembler. :)

ARM ASSEMBLER PROGRAMMING; tutorial, resources, and examples

ARMuC Wiki: HomePage

This one has some examples in assembly if you scroll down the page, also some links of interest:

http://www.neko.ne.jp/~freewing/cpu/arm_olimex/

and perhaps:

**broken link removed**


You might want to have a read of this page too:
Best Assembler for lpc chip. | LPC2000 | EmbeddedRelated.com
 
Last edited:
Grab the top two books here. You have to register, but it's worth taking the time.

If you're going with LPC2148 then you must have the UM10139 LPC214x User Manual. It is absolutely necessary. There's diddly for info in the **broken link removed** for LPCs. The User Manual is where all the necessary info is.
 
Last edited:
You need to learn all the peripherals individually, so blinking led teaches you the basics of everything, plus the basics of the GPIO. Then move on to the interrupts, timers, UART, SPI hardware, learn each individual part of your big project, then bring it all together at the end.

Just because the UART peripheral is there on the uC doesn't mean your work is simple either. For a robust product IO will need to be interrupt driven and the data buffered. Otherwise you run the chance of losing data when just polling.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top