Can anyone point me to a similar resource for the Raspberry Pi?
Can anyone point me to a similar resource for the Raspberry Pi?
http://elinux.org/RPi_Low-level_peripherals
It provides some information on how to interface with the GPIO pins with a multitude of programming languages. Granted it may not be an absolute beginner guide, it still has a lot of useful information. If I can find another guide I'll comment back here.
I'd also want to echo something that the other reply to your comment mentioned, which is that you should seriously consider starting with an Arduino if you want to do some lower-level programming/interfacing with hardware. From my personal experience, there's a little more documentation on that sort of thing with Arduino than the Raspberry Pi. Additionally, the Raspberry Pi's GPIO pins are not fault tolerant, which means you could damage your Pi if you wire up your hardware improperly. If I remember correctly, Arduinos typically have some voltage fault tolerance (at least there are variants which do), and even if you fry the actual microcontroller chip on the board, it can be removed and replaced for a couple of dollars. Once you've got some experience on an Arduino board, then I'd recommend doing some of the low-level stuff on the Raspberry Pi.
I went to a hacker space open house in Orlando (FamiLAB) and a colleague and I were asking whats the difference between a Pi and an Arduino and a guy said what do you want to do and I said make an LED flash...And he said to start with an Arduino and I can see why now, if you want to get in to electronics (and you already have a computer) an Arduino is the way to go.
A Raspberry Pi is a fully functional computer so you have to wait for it to boot in to linux before it can do any other tasks. An Arduino is (almost) instantly on and running you program. Both are great teaching and learning tools but it depends what you want to do with them.
There's nothing to stop you programming the pi bare metal style like an arduino. It's not as well documented but it's perfectly doable and quite fun.
The raspberry pi is a much more complex machine than the arduino. 32 bit instructions vs 8 bit, 700MHz vs 20MHz clock frequency, GPU vs no GPU, 512MB memory vs less than 1MB. There is so much going on in the pi's chip, that a thorough technical reference manual could easily exceed 5000 pages, where as everything you need to know about the arduino's processor will fit in less than 500.
You certainly can make LEDs blink with a raspberry pi with your own non-OS code, but the difference in the amount of code required vs doing it in an arduino is pretty substantial.
I have no arduino experience and am happy to be educated, but I don't see how any of those things makes the pi harder to program. Maybe the instruction set's harder, but that only matters if you're writing asm. There's more stuff you can do, but that doesn't get in the way if you just want to code arduino-like stuff.
> You certainly can make LEDs blink with a raspberry pi with your own non-OS code, but the difference in the amount of code required vs doing it in an arduino is pretty substantial.
Here is some baremetal code that blinks LEDs on a pi:
https://github.com/dwelch67/raspberrypi/blob/master/blinker0...
It's not that bad, really. Admittedly some of the peripherals are much harder work than that. I should add that I have nothing against the Arduino, but as a n00b to baremetal / embedded style programming I'm not finding the pi particularly gruelling. Maybe I just don't know what I'm missing.
Are you saying that the code you linked is loaded with some sort of JTAG device, and is the entirety of the code running on the chip, or is it run from the command line?
Maybe Texas Instruments are just a bunch of sadists.
That's all the code you need to write. You also need a firmware binary supplied by the raspberry pi people. You write your binary and the firmware binary to an SD card, and the pi boots and runs your code via some process that is frankly opaque to me. Alternatively you can stick a bootloader on the card and transfer your binary via an ftdi cable, which is a lot less hassle while developing. All this is detailed in the repo I linked if you're interested.
Using the onboard peripherals is admittedly fairly challenging, largely due to the paucity of documentation available. Hopefully more documentation and examples will emerge as more of us tinker with it.
I'm not yet in a position to compare and contrast to TI's stuff, but I have a Stellaris Launchpad I intend to start playing with soon. Will be interesting to see how it compares.