Thursday, January 18, 2007

PIC & Technical Talks

I have written a simple NE2000-clone driver for the PIC16 micro-controller. The driver provides two mechanisms: Polling and Interrupt based packet reception. Polling is based on the observation on the two pointers in the receive buffer ring. Interrupt is based on the triggering interrupt signal coming from the Ethernet controller. This task is similar to what I have done for my master thesis. I actually transferred most of code from AVR Atmel micro-controller to PIC micro-controller. I found out that the PIC16 uses the 8-level deep hardware stack, thus overflow can be occurred after more than 8 nested function calls. At the same time, all RAM location required by a function are statically linked to a specific address at link time and RAM is reused for functions not active at the same time. So, no recursive calls are allowed. Quite different with the Atmel microcontroller which I have used before.


We had successfully organized two IEEE ComSoc Technical Talks at MCMC (12th Jan) and TMRND (17th Jan). The talk in MCMC was all about Cyberspace Security and MCMC will held a series of technical talks in this year. Dr Jeffrey Bannister spoke about the Fixed Mobile Convergence (FMC) and 3G IP Multimedia Subsystem (IMS), FMC and IMS will move current telecommunication system towards to a full IP based system. Peoples in Telco site have to start understand the network characteristic of IP instead of just 64 kbps time slot. I agree that the IMS is hard to deploy mainly due to difficulty of finding a business model which could benefit the content developer and also the network operator. Who should bear the cost if a content developer has developed a fantastic application and would like to put its application on the network operator site? The network operator argues that the content developer must pay for the service offered by him. However, the developer thinks that the operator is doing nothing and simply gains from the application that he/she develops. It is hard to push the IMS if there is no suitable content for the end user. A big pipe or high bandwidth is simply useless. This is the same story to 3G.

5 comments:

The Soothsayer said...

So, no recursive calls are prohibited.

Meaning that you can do recursive calls?

CYYeoh said...

Keke... it should be

"no recursive calls are allowed"
or
"recursive calls are prohibited"

Thanks... ;)

The Soothsayer said...

Oh yeah... Does the PIC have built in RAM? Or do you need an external RAM? How about the power consumption as opposed to the AVR?

CYYeoh said...

PIC16 has built in RAM known as data memory (some of them are reserved for specific purpose registers). The maximum continuous memory allocation for a variable in my PIC16F877 is 96 bytes. I also use the built in EEPROM data memory as well for variables but with more processing cycles. No external RAM is used since majority of the pin from my I/O Ports are connected to the Ethernet controller. For power consumption, I have no idea on this. The paper “PIC-based TinyOS Implementation” claimed that power dissipation is lower than Mica. Maybe you can comment on this.

The Soothsayer said...

Checked the docs. PIC18 seems to have a well documented external memory bus for RAM.

The microcontroller itself consumes much less energy compared the the Atmega128L but I'm not sure how it fares when you add in the external RAM.