EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24

Started by Bill Giovino October 11, 2005
On 2005-10-13, Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

>>>So far, I've avoided the PIC, but I still have "fond" memories >>>of shuffling 8048 assembly language code around to try to get >>>the page boundaries in the right places. >> >>Sounds just like the fun of juggling AVR code around to get all >>the relative branches in range..... > > Worse. The 8048 did branches by just shoving the lower 8 bits of the > target address into the PC-- so even code that "looked" very close > might not be within range, and if you added or subtracted one > instruction near the beginning of the code it could affect (break) > branches throughout the rest of the program.
And it seems like it usually did...
> Say, is there anyone programming the ARM7 in assembly?
Just the usual bits of RTOS glue and things like an IP checksum routine (it was surprisingly difficult to beat the BSD stack's C version). -- Grant Edwards grante Yow! My haircut is totally at traditional! visi.com
On Thu, 13 Oct 2005 13:28:08 GMT, iddw@hotmail.com (Dave Hansen)
wrote:

><snip> >Until I ran across the PIC, which would be a total waste of beach sand >if Microchip didn't support it so well.
Which is true and one might have hoped would be a lesson from which their competition could well learn. Jon
Spehro Pefhany wrote:

>>Sounds just like the fun of juggling AVR code around to get all the relative branches in range.....
That's a different story - fixed pages a la PDP-8, 8048 and PIC are much more troublesome than limited relative addresses (like AVR and many others). It's pretty easy to control the relative address range by keeping each function strictly KISS. Combining several KISS pieces to fit the fixed pages is much more like attempting to sit on NATO barbed wire (= PITA).
> Say, is there anyone programming the ARM7 in assembly?
Me. But just those pieces that do not work in C. Kind of initial hardware startup and lowest-level exception handling (examples provided on request). All true RISC processors are royal pain to program in assembler, ARM is actually at the easier end of scale (try a Sparc or MIPS). -- Tauno Voipio tauno voipio (at) iki fi
On Thu, 13 Oct 2005 15:58:24 -0000, the renowned Grant Edwards
<grante@visi.com> wrote:

>On 2005-10-13, Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote: > >> Say, is there anyone programming the ARM7 in assembly? > >Just the usual bits of RTOS glue and things like an IP checksum >routine (it was surprisingly difficult to beat the BSD stack's >C version).
It looks like it might actually be pleasant to program in assembly if you have a suitable application (small and not too C-appropriate) and decent tools (especially a good simulator). Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
On 2005-10-13, Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

>>> Say, is there anyone programming the ARM7 in assembly? >> >>Just the usual bits of RTOS glue and things like an IP checksum >>routine (it was surprisingly difficult to beat the BSD stack's >>C version). > > It looks like it might actually be pleasant to program in > assembly if you have a suitable application (small and not too > C-appropriate) and decent tools (especially a good simulator). >
It's quite nice to program in assembly. Though it's called a "RISC" processor, the user doesn't have to worry about pipelines, instruction scheduling, delayed branching or any of that sort of stuff. However, I found it takes a bit of thought to get the most out of a couple features: 1) All arithmetic instructions can affect the flags or not, depending on the user's wishes. That can lead to some pretty slick control structures where the conditional branch isn't dependent on the most recently executed arithmetic instruction but rather a prior one. 2) The arithmetic instructions can all do a shift on one of the operands before doing the "normal" operation called for by the instruction. -- Grant Edwards grante Yow! I don't understand at the HUMOUR of the THREE visi.com STOOGES!!
On Thu, 13 Oct 2005 11:55:37 -0400, Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:

>On Thu, 13 Oct 2005 14:50:42 GMT, the renowned Mike Harrison ><mike@whitewing.co.uk> wrote: > >>On Thu, 13 Oct 2005 14:37:01 -0000, Grant Edwards <grante@visi.com> wrote: >> >>>On 2005-10-13, Dave Hansen <iddw@hotmail.com> wrote: >>> >>>>>>> Why, the 8051 has it beaten every way. >>>>>> >>>>>> Especially for the vile arhitecture. >>>>> >>>>>Surely you jest. It's architecture is orders of magnitude less vile than >>>>>that of the PIC and its bit oriented instructions are a boon. >>>> >>>> The first time I used an 8051, I thought it was the most convoluted >>>> piece of crap that had ever been devised. >>> >>>Never used it's predecessor, the 8048, eh? After the 8048, the >>>8051 seemed like a PDP-11. >>> >>>> Until I ran across the PIC, which would be a total waste of beach sand >>>> if Microchip didn't support it so well. >>> >>>So far, I've avoided the PIC, but I still have "fond" memories >>>of shuffling 8048 assembly language code around to try to get >>>the page boundaries in the right places. >> >>Sounds just like the fun of juggling AVR code around to get all the relative branches in range..... > >Worse. The 8048 did branches by just shoving the lower 8 bits of the >target address into the PC-- so even code that "looked" very close >might not be within range, and if you added or subtracted one >instruction near the beginning of the code it could affect (break) >branches throughout the rest of the program. The 8051 replaced that >with relative branches. > >Nice code density, though. > >Say, is there anyone programming the ARM7 in assembly?
I wrote a ton of assembler back when it was only ARM2 - really nice to work with - only pain was keeping track of which registers you'd used for what....
On Thu, 13 Oct 2005 11:29:13 +0100, Sergio Masci <sergio@nospam.com>
wrote:

>On Thu, 13 Oct 2005, Mochuelo wrote: > >> On Tue, 11 Oct 2005 06:40:35 -0400, "Bill Giovino" >> <editor@noospam-microcontroller.com> wrote: >> >> >http://microcontroller.com/news/microchip_pic24.asp >> > >> >Up to 40MIPS performance, up to 256Kbytes Flash, a 23-bit address bus, and >> >Microchip's benchmarks show that it's faster than the Infineon C16X. A parts >> >selection matrix is included. >> > >> > >> >- Bill Giovino >> > Executive Editor >> > http://Microcontroller.com >> > >> > >> >> Microchip sucks. I can't understand how come someone is paying 3.65 >> EUR for a PIC16F77, when an Atmel ATmega48 can be bought for 1.21 EUR. >> (DigiKey, 100 pcs). The PIC is sheer crap compared to the AVR. I >> didn't know so many rednecks were using MCUs. Otherwise, I can't >> understand Microchip's survival. >> >> Infineon C16X? What are you talking about? That is also sheer crap. >> Get a life, and use any ARM7 (Philips, Atmel, TI, ...) or even a 24xx >> TI DSP for a lower price. >> > >Professionals solve problems and take advantage of the properties of a >"strange" architecture.
Nice. So, what are the advantages of the architecture of a PIC16F over that of an AVR, for instance?
>Amatures bellyache about everything to distract others from the fact that >they cannot compete with professionals.
I might be an "amature" (depending on what it means for you), but it takes an amateur to defend something that is both worse _and_ more expensive. Professionalism is in fact the state of having learnt already the right criteria to decide upon.
>Regards >Sergio Masci
On Thu, 13 Oct 2005 20:37:58 +0200, Mochuelo <cucafera@RE_MO_VE_THIStelefonica.net> wrote:

>On Thu, 13 Oct 2005 11:29:13 +0100, Sergio Masci <sergio@nospam.com> >wrote: > >>On Thu, 13 Oct 2005, Mochuelo wrote: >> >>> On Tue, 11 Oct 2005 06:40:35 -0400, "Bill Giovino" >>> <editor@noospam-microcontroller.com> wrote: >>> >>> >http://microcontroller.com/news/microchip_pic24.asp >>> > >>> >Up to 40MIPS performance, up to 256Kbytes Flash, a 23-bit address bus, and >>> >Microchip's benchmarks show that it's faster than the Infineon C16X. A parts >>> >selection matrix is included. >>> > >>> > >>> >- Bill Giovino >>> > Executive Editor >>> > http://Microcontroller.com >>> > >>> > >>> >>> Microchip sucks. I can't understand how come someone is paying 3.65 >>> EUR for a PIC16F77, when an Atmel ATmega48 can be bought for 1.21 EUR. >>> (DigiKey, 100 pcs). The PIC is sheer crap compared to the AVR. I >>> didn't know so many rednecks were using MCUs. Otherwise, I can't >>> understand Microchip's survival. >>> >>> Infineon C16X? What are you talking about? That is also sheer crap. >>> Get a life, and use any ARM7 (Philips, Atmel, TI, ...) or even a 24xx >>> TI DSP for a lower price. >>> >> >>Professionals solve problems and take advantage of the properties of a >>"strange" architecture. > >Nice. So, what are the advantages of the architecture of a PIC16F over >that of an AVR, for instance?
AVR and PIC have probably about the same number of architectural annoyances - each has good and bad points, but in the big picture, archictecture is WAY down the list of selection criteria compared to things like best-fit of peripherals to the application, cost, availbility (Atmel have a bad track record here), support etc.
Mike Harrison wrote:

> > AVR and PIC have probably about the same number of architectural > annoyances - each has good and bad points, but in the big picture, > archictecture is WAY down the list of selection criteria compared to > things like best-fit of peripherals to the application, cost, availbility > (Atmel have a bad track record here), support etc.
Absolutely and the 8051 has them both beaten hands down on that criteria alone. Ian
Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> writes:
> > Say, is there anyone programming the ARM7 in assembly? >
Well, somewhere around the Cambridge, UK diaspora are a *lot* of people who programmed ARM2,3,6,7 and StrongARM for years in assembly and C: the old Acorn developers and users. *Lovely* assembly language. Designed by someone who had written a *lot* of 6502, and wanted a better one. cheers, Rich. -- rich walker | Shadow Robot Company | rw@shadow.org.uk technical director 251 Liverpool Road | need a Hand? London N1 1LX | +UK 20 7700 2487 www.shadow.org.uk/products/newhand.shtml

The 2024 Embedded Online Conference