PICmicro & dsPIC >> PICmicro & dsPIC

Pages: 1
pit



Reged: Dec 31 2004
Posts: 4
Loc: USA
the programmable interrupt controller. MSP vs. PIC
      #15105 - Sat Jan 01 2005 11:17 PM

Below you can find my conversation with Ricardo about the programmable interrupt controller. Now it is a question which uC is better for this project.
Thanks in advance.

====================
Hi!
I'm the AVR guy, so I don't know enough about msp400.
The reason of my post is in the subject. I need PIC to wake up my AVR from an external interrupt. I'm very limited in power comsumption - so my atmel is sleeping all the time. It's wakeup time is 16k clocks which is too long and I'm loosing interrupt(s) which woke me up. The idea is to use MSP430 as a PIC.
Design.
8 IRQ inputs.
1 INT output
3 IRQ code (CODE)
1 Data/condition (D/C)
1 W/R is write/read my uC will determine who drives CODE and D/C

When Atmel controls/programms msp W/R is 0: Atmel drives
CODE has code if IRQ D/C has condition for interrupt, current Interrupt if active is deactivated. When msp will have the same condition on corresponding IRQ it will generate INT and will be latched.
When msp drives W/R is 1 it has IRQ code(highest priority) on CODE and current condition on D/C.

What do you think? How is it difficalt? How long will it take to implement? Is it possible to put msp to sleep and wake it up(and how fast) from the IRQ or W/R?
Thanks.
------------------
Although I haven’t used the MSP430, I have recently been investigating it (see my post on the PICC forum – PIC vs. MSP). Since there don’t seem to be too many MSP430 users on the Hi-Tech forums, I thought I’d try to help you, despite my limited expertise. However, I don’t understand all of your statements.

To begin with, you state “The idea is to use MSP430 as a PIC”. Ironically, you are using PIC to mean Programmable Interrupt Controller, whereas PIC is also the prefix for Microchip part numbers – e.g., PIC12F6893. Out of curiosity, can you explain why you chose the MSP430 rather than a Microchip PIC? If you DO want to consider using a PIC for your PIC, you should post your inquiry on the PICC forum!

I do understand that you want to use an MSP430 as a programmable interrupt controller for an Atmel microcontroller. The MSP430 would have 8 inputs that can generate interrupts (either individually, or one interrupt that requires polling to determine which input caused the interrupt). The response time must be “fast”, and the power consumption must be “low”. Is this correct? Also, it seems that you have 3 output lines from the MSP430 (CODE) that represent the binary-encoded source of the eight possible interrupts. Under some condition, the MSP430 activates an INT output, I guess to the Atmel chip.

I don’t completely understand the rest of your I/O. It seems that you have other ICs that either the Atmel or MSP430 drives, depending on the state of the W/R line, which evidently originates from some other part of your circuit. Could you clarify, very specifically, the circuit, and the source and destination of all signals?
---------------------
The INT output is an external interrupt for the ATMEL. That is correct.
When the AVR goes to sleep it should set W/R to 1 which means that the PIC drives CODE and D/C. Those lines are the direct connection between the ATMEL and the PIC. Nothing is in between. So, when an interrupt will occur INT will wakeup the ATMEL and it can read CODE and current condition of the correspondent IRQ.
By changing W/R to 0, the ATMEL will release latch and set condition for the next interrupt by any level on the D/C pin.
Is it clear now?

Also let me start how this project has begun. I have to consume as minimum power as possible, so my Atmel sleeps and sleeps and sleeps. Waking it up takes 16k clock or approximately 1ms. I'm losing some interrupts. Actually I do wakeup, but interrupt has already gone and often I have no idea what has happened. We added D-trigger to latch the interrupt source. In this case I need too much pins and chips.
So I don't care what uC to use but I need something very small, ULTRA low power consumption and fast at the same time.
If uC is going to be used as a PIC, we added some more requirements such as ability to program kind of edge, level or just change, coding IRQ input, getting current condition.
In my mind 14 pins should be enough.
Plus, because I'm inexperienced with MSP as well as with PICC I don't care too much. The question is what solution is easier cheaper (HW and SW tools) and faster.

---------------------
OK, you need “something very small, ULTRA low power consumption and fast at the same time”. The MSP430F1101A is available in a 20-pin plastic small-outline wide body (SOWB) package, 20-pin plastic small-outline thin package, 20-pin TVSOP, and 24-pin QFN. In quantities of 100, this chip costs around $1.50.

In the ACTIVE mode (CPU active, all enabled clocks active) power consumption is around 300μA with a 3 v supply. All MSP430s have five Low Power Modes, LPM0 to LPM4. The typical current in LPM3 is about 2μA, and in LPM4 is about 1μA. Upon wake-up from interrupt, the CPU may be clocked from the Digitally Controlled Oscillator (DCO, normally off) which has a 6-μs wake-up. Since the DCO is RC-based, its frequency varies with product, temperature, and voltage. Any pin on Port P1 can generate an interrupt on the individually-selected edge; flags are tested to determine which pin caused the interrupt. The same is true for Port P2.

Development kits for the TI chips may be purchased directly from TI. They call them FETs (Flash Emulation Tools). There are two kits applicable to the MSP430F1101A: the MSP-FET430X110 is $49 and handles seven chips; the MSP-FET430P120 is $99 and handles nine chips. The latter includes two MSP430F1232 devices, an FET to PC adapter, full documentation on CD ROM, a development board with ZIF socket, header pinouts for prototyping, and an integrated IAR Kickstart user interface which includes an assembler, linker, simulator, source-level debugger, and limited C compiler (4K max). These boards employ the JTAG interface. At this point I’m not familiar with the Hi-Tech compiler and other support, but you could also look into this.

Everything is relative. How does this sound? Is your application low or high volume? Perhaps someone else can supply similar info for the PIC.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
1 registered and 31 anonymous users are browsing this forum.

Moderator:  mikerj, jtemples, jeff, Dan Henry, Andrew L 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is enabled
      UBBCode is enabled

Rating:
Topic views: 1489

Rate this topic

Jump to

Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5