finding the suitable IC!

Status
Not open for further replies.

amindzo

Member
Hi, i want to to know that which PIC has the same pin as PIC16F873A but has more program memory?

thank you
 
16F873A:
RAM (bytes): 192
Data EEPROM (bytes): 128

16F876A:
RAM (bytes): 368
Data EEPROM (bytes): 256

18F2620
Program Memory Size (Kbytes): 64
RAM (bytes): 3968


Yet another example why 18F's take the cake for PIC's
 
The 16F877A is a 40 Pin PIC, the original (16F873A) is a 28 Pin.

The 16F876A I llinked earlier is also a 28 Pin
 
Hi, i know. i want to know that which PIC has the same pin as PIC16F877A and has more program memeory?
 
Not just the fact they are optimized for higher languages, but doesn't the Program Memory of 64 Kbytes appeal to you? Not to mention the fist full of other hardware features, some even have hardware USB support

No bank switching = linear memory addressing. They even have more low leveling programming functions/commands for more diversity with Assembler


Either way, they are a lot better than 16F PIC's, and they are not nearly as hard as most people are lead to believe
 
I agree with gramo, I find the 18 Series really nice.

My general rule is if its <18 pins then 16 series
Need more than 2k then 18 series

Add to gramo's list is dual level interrupts really handy
 
better or not, but If you are advanced enough to even think about using USB or some other "exotic" Hardware interfaces, then you most definitely are NOT going to use something so primitive as Basic! Use C compilers. 18F is imho built for C and even has a free compiler from microchip for it.

I have nothing against Basic itself as a language, it's a great language for learning programming and picing. But one must know, where to stop using basic and move on to higher languages. and 18F series is the line IMHO.

Ok I personally do not use PIC, but I have used them as PICAXE chips. very cool little buggers with bootloader for basic etc. perfect for learning and a lot better than those basic stamp thingys IMHO. now I have moved on and am "playing" with AVRs in GCC. much faster operating times and much more processing power and capabilities. I can virtually do what ever I want with those chips. No hacking needed to get some things written the way I want etc.


Everything has it's place and time, and if you are using 18F, there is no roob nor time for basic...
 

I'm not disputing the obvious advantages of the 18F series PIC's, just that as a BASIC only programmer the advantages are fairly minor for you. As for 64Kb of memory, the number of occasions you require it are probably EXTREMELY few - although, obviously, if you need large memory it makes sense to use an 18F. Most of the hardware features are available on the 16 series, even including the USB - although it's only an OTP device.
 
lol bloody-orc, I see your referring your experience too PICAXE ... There is no structural difference between the end product/flexibility/diversity of Basic/C with microcontrollers, its a matter of preference/programming technique and background experience. PICAXE is anything but a true PIC Basic compiler…

Here's an example of USB control with Swordfish.
Code:
[B]device [/B]= 18F4550
[B]clock [/B]= 48   

// 20Mhz crystal, 48Mhz internal (FS USB)
[B]config[/B]
   PLLDIV = 5,
   CPUDIV = OSC1_PLL2,
   USBDIV = 2,
   FOSC = HSPLL_HS,
   VREGEN = ON 

// import modules...
[B]include [/B]"usbhid.bas"

// TX report...
[B]structure [/B]TTXReport
   Time [B]as word[/B]
   Message [B]as string[/B]
[B]end structure[/B]


[B]dim [/B]TXReport [B]as[/B] TTXReport [B]absolute [/B]TXReportRAM  


// RX report...
[B]structure [/B]TRXReport
   LED0 [B]as bit[/B]
   LED1 [B]as bit[/B]
[B]end structure[/B]    

[B]dim [/B]RXReport [B]as [/B]TRXReport [B]absolute [/B]RXReportRAM 

// alias port pins to LEDs...
[B]dim [/B]
   LED0 [B]as [/B]PORTB.0,
   LED1 [B]as [/B]PORTB.1

   

// initialise...
TXReport.Time = 0
[B]low[/B](LED0)
[B]low[/B](LED1) 

// connect to USB...
[B]repeat[/B]
[B]until [/B]HID.Connected

 

// main program loop...
[B]while true[/B]

   // if we have data, set port values, update message
   // and then reset time counter...
   [B]if [/B]DataAvailable [B]then[/B]
      ReadReport
      LED0 = RXReport.LED0
      LED1 = RXReport.LED1
      TXReport.Message = "PORT CHANGED"
      [B]WriteReport[/B]
      TXReport.Time = 0
      [B]delayms[/B](100) 

   // no data, set waiting message...   
   [B]else[/B]
      TXReport.Message = "WAITING..."
      [B]WriteReport[/B]
      [B]inc[/B](TXReport.Time)
   [B]endif[/B]

[B]wend[/B]

For more information on any commands, see the Swordfish library... Not all compilers offer a true structured modular PIC Basic programming style like this. Especially not PICAXE!
 
Last edited:
well... C for instance is a good language, basic is a boring one....
but that is only my personal statement.

It's just that everyone has his/hers own flavors of compilers and this is my choice. C seems to create a LOT faster and smaller code too, but then again ASM is a lot faster and smaller. But ASM takes ages to write, but then BASIC is the fastest language to write in... Every language has its advantages and disadvantages. It's all up to the compilers and programmers to choose, witch ones are the good ones and witch ones are the bad ones...

This is all personal experience with AVRs and some PICs. I'm no guru at this you know...
 
"C seems to create a LOT faster and smaller code too"

As a coder who can write in ASM I look at the source of the compilers I use, you will find its very compact and in some cases will better than C

Its done to the compiler not the language
 
Last edited:
bloody-orc said:
C seems to create a LOT faster and smaller code too, but then again ASM is a lot faster and smaller.

It comes down to the compiler and programming techniques - nothing to do with the language (even Assembler) for most, if not all cases.

There are even many "C" or "Basic" compilers that don't even offer a module approach to programming... that’s how significantly different things can be.
 
Last edited:
bloody-orc said:
well... C for instance is a good language, basic is a boring one....

BASIC or C are just languages, what makes programming interesting is algorithms. I have no experience with PIC BASIC compilers since I am C++ programmer myself, but having some background in compiler theory I see no reason why one language would be better than another.
 
Speed. On a micro controller squeezing every last ounce of power out of a chip is sometimes desired, different programming methods do math in different ways. Not much can beat hand tuned ASM for raw speed.
 
Back to language wars...

Modular programming is as much a state of mind/technique as it is a language feature. You can do modular programming without compiler support. Good programmers wrote modular code prior to compiler supported modular features.

With asm there is a 1 to 1 mapping between what you write and the code generated. With asm it is all programming technique.

C has had function and locals from the start. They are the most basic tools of modular programming.

The early Basic compilers had no concept of a function or procedure. No local variables. This made it very difficult but not impossible to do modular programing. Just a bit worse then asm where you can link modules.

Long live BABL.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…