Technology Industry
Industry: Email Alert RSS FeedA picocontroller training simulator in a Web page
International Journal of Electrical Engineering Education, Apr 2003 by Collier, M
Abstract
A software simulator hosted in a Web page is described, and the evaluation of its effectiveness by students of the National University of Science and Technology in Zimbabwe is discussed. The processor which is simulated is the PIC16F84 picocontroller, and the screen display shows the source program, RAM locations and Special Function Registers. To minimise the size of the package, the functionality has been reduced so that it only displays a set of sample programs representing a number of key techniques in the programming of the device. Users can step through programs observing the memory changes to facilitate an understanding of the operations.
Most RecentTechnology Articles
Keywords software simulation; web-based training
With the pace of development in electronics, the training and education of engineers demands a steepening of the learning curve if students are to familiarise themselves quickly with new devices. This is particularly true in the case of programmable integrated circuits, where familiarity with the interaction between software instructions and hardware architecture is essential to achieving design expertise. The plethora of new offerings in this field is a stimulus to the introduction of rapid-learning techniques into the classroom environment.
Among the devices introduced in the electronic engineering degree course at the National University of Science and Technology (NUST) in Zimbabwe is the picocontroller. This variant of the microcontroller provides a flexible, cheap processing unit which lies at the heart of many student projects and industrial consultancies in the country. Consequently it is necessary for students to gain a solid grasp of the intricacies of the hardware and the programming techniques as swiftly as possible. Therefore the regular lecture course and laboratory sessions have been complemented by the provision of a training simulator on the departmental Intranet.
The requirements of the simulator were that it should be easy to access, provide several selectable sample programs, and cover a some of the more intricate skills necessary to utilise the chip effectively.
Details of the picocontroller
One of the devices which have been chosen for teaching and project work in the embedded computer systems course at NUST is the P1C16F84,1 which is an 8-bit microcontroller manufactured by Microchip. This version incorporates a considerable amount of EEPROM program memory, which can be rapidly downloaded and erased. In consequence the design and development cycle can be shortened because rapid iterations in program development are possible. The basic hardware structure of the PIC16F84 is shown in Fig. 1. Input/output facilities of the device include:-
1 One 8-bit bi-directional port.
2 One 5-bit bi-directional port, of which one line is open-collector.
3 One external interrupt input.
4 One counter input.
Versions are available for either 4MHz or 10 MHz clock oscillators, which may be implemented using R-C circuits or crystals. A reduced instruction set of opcodes provides single-cycle execution of most instructions, resulting in fast performance, which is further enhanced by a two-stage instruction pipeline.
The device incorporates 36 bytes of user RAM, known in Microchip terminology as File Registers. A further 64 bytes of non-volatile data memory is available for storage and retrieval by the program.
In common with most microcontrollers the PIC utilises a bank of Special Function Registers (SFRs) for controlling the hardware parameters. These are summarised in Table 1.
The concept of an embedded applet
The advent of the Internet has made possible access to information in a structured and standardised manner. Within the Electronic Engineering Department at NUST, a local area network based on the Windows-NT operating system provides an Intranet that is available to both students and staff.
One way to implement the software simulator for the picocontroller would be to make it available as a downloadable file from the system server. This would require the user to download the file and then execute it. A more user-friendly approach has been adopted by providing the simulator within an Internet web page, which is ready to run as soon as the page is displayed.
The page contains the simulator in the form of an interactive applet, which accepts input through mouse clicks on screen buttons, and displays values of the registers within the picocontroller.
Since the access time to the Internet page needs to be kept low, especially if it is being accessed by a remote site on the Internet, the size of the applet code has been reduced to the minimum consistent with the educational objectives of the simulator. As a result the range of activity has been deliberately restricted to allow basic familiarisation with the picocontroller, without providing full functional simulation.
The facilities of the simulator
Upon opening the Web page, the user is presented with the screen display shown in Fig. 2, from which a sample program may be selected. On mouse-clicking the selector box, a menu of programs highlighting various programming techniques is offered, as seen in Fig. 3. Once a program has been chosen, the source code appears in the left-hand window together with a red bullet indicating the next instruction to be executed.
CXO UnpluggedSmart Business interviews on BNET
Brought to you by CBS MoneyWatch.com
- Best- and Worst-Paid College Degrees
- 6 Things You Should Never Do on Twitter or Facebook
- How Much Sleep Do You Really Need?
- 6 Big Myths about Gas Mileage
- 5 Rules for Immediate Annuities
- Death in the Family: 12 Things to Do Now
- Dumbest Things You Do With Your Money
- 6 Online Networking Mistakes to Avoid
- 401(k) Mistakes to Avoid
- 5 Economic Scenarios to Keep You Up at Night
- The Real ‘Best Places to Retire’
- Best Credit Cards for You
- 12 Tough Questions to Ask Your Parents
- The Real ‘Best Colleges’
- Home Buyer Tax Credit: How to Cash In
- Why You Shouldn't Bash Cash
- 8 Phony 'Bargains' and Better Alternatives
- Danger: 3 Debit Card Scams to Avoid
- 6 Myths About Gas Mileage
- 29 Fees We Hate Most
- Quick and Easy Ways to Boost Returns
- Best Stocks to Buy Now
- Lower Your Taxes: 10 Moves to Make Now
- New Jobs: 8 Lessons from Real-Life Career Switchers
- The New Job Market: Who Wins and Who Loses?
- Health Care Reform's Public Option: Everything You Need to Know
- Volunteer Work When Unemployed: Should You Work for Free?
- Whose Recovery Is This?
- Long-Term-Care Insurance: 4 Biggest Risks to Avoid
Content provided in partnership with
Most Recent Technology Articles
- Verizon expands 3G network coverage in upstate New York
- PlasmaTech Inc names Alpha Security Systems Ltd as new platinum distributor
- ADC's GSM base station and switching product portfolio acquired by Altobridge
- Verizon expands 3G network coverage in upstate New York
- Partner Communications appoints Eli Glickman as Deputy CEO
Most Recent Technology Publications
Most Popular Technology Articles
- Building cost comparison between conventional and formwork system: a case study of four-storey school buildings in Malaysia
- Failed businesses in Japan: a study of how different companies have failed, and tips on how to succeed, in the Japanese market
- Political stability and economic growth in Asia
- What's the point of differential protection?
- EBay's Panty Raid - Industry Trend or Event



