Showing posts with label SAM7. Show all posts
Showing posts with label SAM7. Show all posts

Friday, May 06, 2011

Beagleboard, OMAP, and Angstrom

I've been doing a lot lately at work with the BeagleBoard, shown at right. It uses an OMAP processor from Texas Instruments. The OMAP family is ARM-based and includes a DSP core, along with an intimidatingly rich set of on-chip peripherals. The OMAP is built with a package-on-package arrangement so that the RAM die sits right on top of the processor die.

The board typically costs about $150 in the United States. You'll need a few things to work with it: an SD card, a USB adapter to write the SD card, a USB-to-serial adapter to communicate with the board, a 5-volt power supply, and later (maybe sooner) you'll want a USB hub with a RJ-45 ethernet jack.

A minimal setup is shown at right. This is just enough to connect to the board over a serial port (115.2 kbaud, 8N1, no flow control) and verify that you get a working Linux shell. The Angstrom Linux distribution has a bit of a learning curve but it seems well thought out.

I'm thinking of trying Angstrom on one of the AT91SAM7S boards from Sparkfun when I get a little spare time. I think that would work, and it would really rock to see full-blown Linux running on a $36 board. I don't know how I'd handle networking in that kind of situation, though.

Update: I am reminded that the SAM7S lacks an MMU so it can't run Angstrom. There is a different Linux distribution called uCLinux (see uclinux.org) that would work, maybe I'll try that some day.

Wednesday, March 09, 2011

AT91SAM7S and Android help you bang bits

There are plenty of test instruments (oscilloscopes, logic analyzers, spectrum analyzers, etc) where you plug some hardware into your laptop's USB port, and the laptop screen shows a display that would have appeared on a cathode-ray tube in decades past. It's very cool that we can do this, and these USB instruments are much more affordable (and much much easier to carry) than the old-school stuff that I grew up with.

The BluetoothBitBang is a gadget that comprises two boards from Sparkfun Electronics. One is a AT91SAM7S-64 header board, the other is a Bluetooth serial interface. You can see there are also some AA batteries in there to power the thing. This connects over Bluetooth to your phone, running a free app available on the Android Market. You can use buttons on your phone's screen to set or clear six output bits, and you can read six input bits. The two boards cost $71, and if you're willing to do some fine soldering and use the bare version of the Bluetooth module, you can knock off twenty bucks. If I'm energetic, maybe I'll see about putting together some kind of significantly cost-reduced version. That might depend on the level of interest I see in the thing. I've posted a Wikipedia page with a lot more information, including the schematic of how the boards are wired up.

The SAM7 firmware and the Android app source code are both publicly available on Github. I'm an Android fan, but the Bluetooth protocol for talking to the board is quite simple and if anybody is interested in writing an iPhone or BlackBerry app for the thing, I'll be happy to provide some support to make that relatively easy.

I think this whole thing gets a lot more interesting when (1) you move from a phone to an Android tablet, which will be cost-effective as tablets flood the market over the next year or two, and (2) start building much more sophisticated data acquisition front-ends. This is just about the simplest acquisition hardware I could imagine that would still be worth the effort of building and debugging it, but no reason one couldn't do a Bluetooth-connected oscilloscope or logic analyzer.

Tuesday, March 01, 2011

Sparkfun's Bluetooth serial-port board

This was preparation for the project in the next post.

I've been tinkering with the BTM-182 Bluetooth serial port module, available from Sparkfun as either a raw module or a convenient breakout board. I've set the baud rate to 115.2 kbaud and connected it to a USB serial port (appearing as /dev/ttyUSB0 on my Linux netbook) and getting power from a USBMOD4 board from Hobby Engineering, whose only purpose here is to provide 3.3 volts. The serial port uses a RS-232 level shifter from Sparkfun.

I wrote some Python code that runs on the Linux netbook. It opens the serial port and provides a teeny calculator-like command interpreter to anybody connecting over the Bluetooth serial connection offered by the BTM-182. Currently I'm using CoolTerm running on a Macbook for that, pairing with the "Serial Adaptor" device using PIN "1234".

Using the calculator-over-Bluetooth looks like this:
Good morning
multiply 3 4 5
60.000000
add 6 8 12
26.000000
Later I'll replace the netbook with a AT91SAM7 microcontroller board, also running a little command interpreter, and use the Bluetooth connection to talk to my Android phone. The next step is to hang some analog data acquisition hardware off the SAM7 and make a low-speed oscilloscope, displaying waveforms on the phone.

Tuesday, December 21, 2010

Developing for the AT91SAM7 microcontroller

I once purchased a SAM7 P256 board from Sparkfun for $72. This post is a bunch of pointers to the resources I’ll need to develop for it. The same code will work on the H64 header board (only $35), which can be used in future USB projects. UPDATE: Sparkfun no longer sells the H64 header board, but they have a H256 board for $45.

This post assumes an Ubuntu Linux environment.
Set up the development environment.
Use Sam_I_Am to access the SAM-BA bootloader.
Some easily available demos and example programs
Other resources

Tuesday, January 01, 2008

Xilinx Spartan 3 FPGA eval board

I was thinking I wanted to do something with the ARM91SAM7 eval board and a Xilinx FPGA, and I discovered that Xilinx also sells a eval board for their Spartan-3 FPGAs for $150. Here's the user guide (PDF). Big surprise, it's available at Digikey.

The Spartan-3 series has hardware multipliers, blocks of RAM, and "distributed RAM bits" which you can spread around your design as needed. Pretty sweet. As I mentioned in an earlier posting, there are readily available HDL tools for FPGA design on a Linux platform. Hardware design shouldn't necessitate the indignities of Windows.

Here is a ridiculously affordable SAM7 board that I need to investigate. It lacks RS-232 level converters, and you need to kludge the JTAG stuff (probably drive it with a parallel port somehow or other). Also interesting are these two open-source simulators for the ARM7 architecture.

The idea would be to use the SAM7 eval board to program the FPGA on the Spartan-3 eval board. FPGA programs are pretty large, so maybe this should be done by feeding the bits through the USB cable. Then you have some GPIO bits on the SAM7 connect to IO pins on the FPGA, and other IO pins on the FPGA to the outside world.

Some years ago, there was a guy who got his hands on some prototyping hardware of this sort (PowerPC based, I think I recall) and he set up a paid-subscription website where subscribers could submit compiled code and run it on his hardware. The cost of a subscription was small compared to the price of buying one's own hardware. According to EE Times Asia, Hitachi was doing the same thing in 2002.
Hitachi Semiconductor America Inc. is trying to move remote engineering to the next level by letting customers tinker with microcontroller hardware and software tools via a Web browser.

Working with DevelopOnline, Hitachi has set up several remote development stations for its H8 microcontroller family. For a fee, engineers can access these remote engineering laboratories from a PC at any time. Hitachi launched the service with its H8/3664 microcontroller device and plans to expand the program during the next several months to include other members of the H8 line and the company's SuperH devices.
One could make two of these gadgets and connect one to an Apache box to set up a remote development website like this. The second gadget is used to tweak/observe GPIO pins, interact with serial debug, etc. There would need to be some mechanism for allocating time fairly among multiple subscribers. The website would want lots of example code (or pointers to code findable on the web) for people to get started.

Thursday, December 27, 2007

AT91SAM7S microcontroller and eval board

Recently I came across the AT91SAM7S microcontroller from Atmel (Wikipedia article). It's a very cool gadget and is affordably available at Digikey. Here is Atmel's ad copy:
The AT91SAM7SE512 is a Flash microcontroller with external memory bus based on the 32-bit ARM7TDMI RISC processor. It features 512K bytes of embedded high-speed Flash with sector lock capabilities and a security bit, and 32K bytes of SRAM. The integrated proprietary SAM-BA Boot Assistant enables in-system programming of the embedded Flash. The external bus interface supports SDRAM and static memories including CompactFlash and ECC-enabled NAND Flash.

Its extensive peripheral set includes a USB 2.0 Full Speed Device Port, USARTs, SPI, SSC, TWI and an 8-channel 10-bit ADC. Its Peripheral DMA Controller channels eliminate processor bottlenecks during peripheral-to-memory transfers. Its System Controller manages interrupts, clocks, power, time, debug and reset, significantly reducing the external chip count and minimizing power consumption.

In industrial temperature worst-case conditions, the maximum clock frequency is 48MHz. Typical core supply is 1.8V, I/Os are supplied at 1.8V or 3.3V. An integrated voltage regulator permits single supply at 3.3V. The AT91SAM7SE512 is supplied in a 128-lead LQFP Green Package, or a 144-ball LFBGA Green Package. It is supported by an Evaluation Board and extensive application development tools.

The AT91SAM7SE512 is a general-purpose microcontroller, particularly suited to applications requiring high performance, USB connectivity and extended on- and off-chip memory.
So that's already pretty cool, but even better, there is a great little evaluation board which is also available at Digikey. Software resources abound.