Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Just wondering about other language for PIC

Status
Not open for further replies.

tinhnho

New Member
Hi folks,

I have taken fews courses about C, Pascal( long time ago) and FORTRAN. I know that there is a method for parameter passing used by many FORTRAN
compilers is that of an In-Line Argument List. In this method the parameter values or address pointers are stored in a list following a 'call' instruction.
And I'm just wondering how come this method will now work for an embedded system using a PIC device ?.

Sorry if my question is silly question , but just curiosity. Thanks
 
You can do this with C on a 18F series PIC but most of the smaller PICs cannot pass variables on the stack so I would guess that the pseudo code generated by the compiler passes them via global variables.
 
PIC16 series does not work well with C, but it will work. Microchip has no C compiler product for this series but others do make compilers, with varying effectiveness.
PIC18 series was designed to be more C-friendly. Code can compile to quite a reasonable size and speed. Microchip offers a quality C compiler for free.

24F/dsPIC30F/dsPIC33F are much better still, with a stack with greater capabilities not to mention lots of other spiffy capabilities- 16 bit datapath, 16/32 bit math/data manipulations, hardware divide.
 
There's a language called forth that might be what you're looking for. I believe there have been several micro controller versions of both forth assemblers and real time forth interpreted languages than run serially. It's basically assembly language with macros to interprete stack based user input into machine langauge for the given processor. It's almost 'logo' with extensions.
 
Last edited:
forth however is another one of those teaching languages. There's still a huge following of forth users out there now, enough so that PIC and micro controller versions of it pop up obviously... But still, it's not overly practical except for the users that learn it well over time..
 
Sceadwian said:
forth however is another one of those teaching languages. There's still a huge following of forth users out there now, enough so that PIC and micro controller versions of it pop up obviously... But still, it's not overly practical except for the users that learn it well over time..

I thing 'huge' following is a bit hopeful?, but there are PIC versions available - but it's NOT a good language for a PIC as it's probably the most stack heavy language there is?. I've still got a version of Forth that runs on a MicroTan 65!.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top