15.11.2012 Views

FREE VB COURSE - Index of

FREE VB COURSE - Index of

FREE VB COURSE - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HANDS-ON MICROCONTROLLERS<br />

40<br />

Figure 4. You can actively program an R8C via the Internet.<br />

Level 1: On the hardware side, the simplest option only<br />

requires a level converter for the RS232 interface, as previously<br />

mentioned, and a serial interface cable. To that<br />

you can add the free Renesas NC30 compiler with its<br />

integrated development environment (HEW).<br />

Although the compiler is restricted to 64 KB, that does<br />

not impose any restriction on projects using the R8C,<br />

since it can anyhow only address a maximum <strong>of</strong> 64 KB.<br />

Besides C projects, it’s also possible to develop assemblylanguage<br />

programs. The debug output format is<br />

IEEE 695.<br />

The HEW program or the KD30 program (also free <strong>of</strong><br />

charge) can be used for debugging. Code generated by<br />

Figure 5. And experimental prototype circuit using the R8C/13 board.<br />

This circuit will be presented in the February 2006 issue.<br />

the GNU C compiler can also be debugged using this<br />

tool. All you have to do is to change the debug format to<br />

IAR/ELF Dwarf2. You can use Flashstart or FDT to flash<br />

the finished application into the microcontroller.<br />

Level 2: If you want to perform debugging using a synchronous<br />

serial interface, independently <strong>of</strong> the crystal frequency<br />

and without using a monitor, you need Renesas’s<br />

smallest hardware debugger, the model E8 (Figure 3).<br />

For the duration <strong>of</strong> this series <strong>of</strong> articles, it can be<br />

obtained from Glyn GmbH & Co. KG at a special price<br />

<strong>of</strong> €110 (ex VAT) instead <strong>of</strong> the regular price <strong>of</strong> €150.<br />

The E8 can generate breakpoints at data location as well<br />

as addresses, and it supports genuine real-time program<br />

execution and extended trace levels. The PCB pads for<br />

connecting this tool are already present in the free area<br />

<strong>of</strong> the circuit board described in the December issue. All<br />

you have to add is a few header pins.<br />

The integrated development environment (HEW) is also<br />

used for debugging at this level, because it is the only<br />

one that supports the E8. Here again, either the NC20<br />

compiler or the GNU C compiler can be used. Flashstart<br />

or FDT can then be used to flash the finished application<br />

into the microcontroller.<br />

Level 3: For pr<strong>of</strong>essional s<strong>of</strong>tware development, R8C<br />

s<strong>of</strong>tware can also be debugged using the Renesas<br />

PCC7501 real-time emulator, which naturally comes at a<br />

higher price. The PC7501 is connected to an emulation<br />

probe and provides countless features for searching for<br />

errors. It can measure program execution times and<br />

record the individual steps executed before a bug. It can<br />

also record digital signals from the application circuit ‘on<br />

the side’ with a resolution <strong>of</strong> 1 µs.<br />

The outlook<br />

If your curiosity has been aroused by now, you can<br />

already start doing a few ‘preliminary exercises’ with the<br />

R8C. The www.renesasinteractive.com website is a good<br />

resource for this. There you can even program a genuine<br />

starter kit via the Internet (see Figure 4), and you can<br />

naturally learn more about the features <strong>of</strong> the R8C. The<br />

only s<strong>of</strong>tware you need to have installed on your computer<br />

for these functions is a web browser. The NC30,<br />

NEW and KD30 programs run entirely on the remotely<br />

controlled computer.<br />

Besides this, you can also use your own computer to<br />

check whether specific tasks can be handled using this<br />

microcontroller. However, that does require installing a<br />

few programs before you start (see inset). It must be<br />

admitted that the necessary s<strong>of</strong>tware takes up a certain<br />

amount <strong>of</strong> space and requires some familiarisation. Naturally,<br />

all <strong>of</strong> the programs will be provided on the s<strong>of</strong>tware<br />

CD-ROM available from Readers Services, and detailed<br />

installation instructions will also be provided with the programs.<br />

All <strong>of</strong> that will be topped <strong>of</strong>f with simple projects to make<br />

your first steps with the R8C/13 even easier. Figure 5<br />

shows an experimental prototype <strong>of</strong> a circuit<br />

planned for the February 2006 issue. It doesn’t<br />

require much more than a voltage regulator and a pair <strong>of</strong><br />

transistors for the serial interface!<br />

(050179-1)<br />

elektor electronics - 1/2006

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!