Helpful ReplyHot!Pic Programming Language

Page: 1234 > Showing page 1 of 4
Author
AleMala
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2018/10/07 15:30:17
  • Location: 0
  • Status: offline
2018/10/28 10:23:03 (permalink)
1 (1)

Pic Programming Language

I was working since many years when i have seen the pic code.
I decide to have two options: 1-I was stupid, 2-it was to complex for me.
After a few application i built i started to understand.
I think c language is not suitable for pic cause the data allocate the most
in stack and pic doesn't have data stack.
As an example, this could be a blink led program:

blinker processor is picf1455
uses (cpu, TMR0, PORTx)
config default
device id default
user id default
const DELAY = 100
{
select clock 3.7Mhz ;
goto $ ;
}
cpu:toggle(bit b){
BTFSC b:val,b:pos 
b := 0 
BTFSS b:val,b:pos 
b := 1 
}
PORT A,B
led ouput PORTA,3
button input PORTB,4
{
when ( button fall ) {timer:start()}
when ( button rise ) {timer:stop() }
}
timer extends TMR0;
timer:irp() { toggle led; TMRO := TMRO-DELAY; }
timer:start() { TMRO := -DELAY; TMR0:IE := 1; }
timer:stop() { TMR0:IE := 0; }

Alessandro.
#1
Jim Nickerson
User 452
  • Total Posts : 5450
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: Pic Programming Language 2018/10/28 10:37:31 (permalink)
+1 (1)
I think you might be surprised.
Try MpLab X and MCC.....
#2
katela
Super Member
  • Total Posts : 982
  • Reward points : 0
  • Joined: 2013/06/11 05:25:18
  • Location: South Africa
  • Status: online
Re: Pic Programming Language 2018/10/28 11:11:10 (permalink)
0
Try to start with a simple PIC with no complex peripherals like USB.

Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
YouTube Tutorials: https://www.youtube.com/user/StudentCompanionSA
#3
qhb
Superb Member
  • Total Posts : 7526
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: Pic Programming Language 2018/10/28 12:30:02 (permalink)
+3 (3)
AleMala
I was working since many years when i have seen the pic code.
I decide to have two options: 1-I was stupid, 2-it was to complex for me.
After a few application i built i started to understand.

What is the language in the code you posted?
It is not PIC assembler, and it is not C.
 

I think c language is not suitable for pic cause the data allocate the most
in stack and pic doesn't have data stack.

You're wrong, and plainly have not looked at the C compilers available for PICs
 
#4
NKurzman
A Guy on the Net
  • Total Posts : 16568
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/28 14:01:39 (permalink)
+3 (3)
Unless you are posting from the last century, i have no items where you would get the idea that PICs can not be programmed with C.
Yes the PIC has no data stack. But that issue was solved in the 1990’s.
What is what you posted? And existing programming language or one you are trying to create?
#5
AleMala
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2018/10/07 15:30:17
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/28 17:41:51 (permalink)
-5 (9)
Dear mr. Jim.Nickerson:
i use mplab since was invented and tried MCC but is rubbish.
 
Dear mr. katela:
I developed and sell ferrari digital advance using pic at:
http://alemala.xoom.it/alemala/ad308/index.html
May be you can ask MSD (nr.1 in usa) if they are able to design it.
 
Dear qhb:
I tought you had enough brain to understand it was a proposal for a meaningull pic language.
YOU ARE WRONG (how can you know what i do!). I used the first pic c more than 10 year ago. You went back from there and XC8 uses FSR0H:L to set TMR0 byte using more than 10 stmt.
The first time i used XC8 memory was finish to allocate stdin and stdout can somebody tell me
where pic reads from and wright to ? You are creazy and it is just  RUBBISH.
 
Dear mr. NKurzman:
The world is full of stupids programmer using c to develope boards to throw away.
The pic i use now Pic16f1459 it is still waiting for 1990 invention?
I am not trying to create a language. To create programming language is my job
(something like esperanto).
If you like you can think i was jokeing with the current programmers stupidity !
Either to set carry !!!!!
 
Dear Microchip:
Hope you will IMMEDIATELY remove my account from your forum that is just full of
stupid and bad GUYS.
Regards.
#6
qhb
Superb Member
  • Total Posts : 7526
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: Pic Programming Language 2018/10/28 18:05:54 (permalink)
+7 (7)
AleMala
...
Dear qhb:
I tought you had enough brain to understand it was a proposal for a meaningull pic language.

Maybe you could have done something smart in your first post, like actually use the word "proposal".
I'm afraid your command of the English language is not as good as you imagine.
 

YOU ARE WRONG (how can you know what i do!). I used the first pic c more than 10 year ago. You went back from there and XC8 uses FSR0H:L to set TMR0 byte using more than 10 stmt.

Really?
I just tried adding "TMR0 = 100;" into a project I'm working on. Here is the code it generated.
  5033                           ;flipdig-main.c: 94: TMR0 = 100;
  5034  07A3  3064                   movlw    100
  5035  07A4  0095                   movwf    21    ;volatile

XC8 has only existed since 2012, so I don't know how you tested it 10 years ago.
(Yes, I know it evolved from HiTech C, but you specifically said XC8.)
 

The first time i used XC8 memory was finish to allocate stdin and stdout can somebody tell me
where pic reads from and wright to ? You are creazy and it is just  RUBBISH.

You're just babbling.
 

Dear Microchip:
Hope you will IMMEDIATELY remove my account from your forum that is just full of
stupid and bad GUYS.
Regards.

I support this request. I'd like your misery in our company to be relieved as soon as possible. :)
#7
katela
Super Member
  • Total Posts : 982
  • Reward points : 0
  • Joined: 2013/06/11 05:25:18
  • Location: South Africa
  • Status: online
Re: Pic Programming Language 2018/10/28 18:27:47 (permalink)
+2 (2)
Why post in the Forum when you believe you are all-knowing than anybody in the forum?
This is definitely not your place.

Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
YouTube Tutorials: https://www.youtube.com/user/StudentCompanionSA
#8
JPortici
Super Member
  • Total Posts : 433
  • Reward points : 0
  • Joined: 2012/11/17 06:27:45
  • Location: Grappaland
  • Status: offline
Re: Pic Programming Language 2018/10/28 18:36:48 (permalink)
+3 (3)
Hi alessandro,
You should have read on how XC8 works, what are the tradeoffs that allows it to generate the most efficient C code possible for 8 bit pics. The difference between compiled and emulated stack mode, why compiled mode is default and why emulated is so inefficient.
Anybody will agree with you that the architecture of 8 BIT PICS* is not the best for a C compiler, but in my opinion another strange niche language is not the answer. XC8 is fine, it really is! until you try to use features that are not supported by the hardware and have to be emulated, such as function pointers and pointers in general (the INDF registers are not used as much as i'd like them to be)
Long gone are the days where crippled languages were used because compilers were crazy expensive or simply not available. I started learning PICs in 2007 and back then i really liked using mikroe compilers. They also produced good code. When XC8 first came out i ditched them to have something integrated in the official IDE and that didn't have a stupid code size limit. i could live with less optimization and the more time passed the better it became. And in any case, if the part can excecute the code in the required amount of time.. who cares which language it is! Might as well be C so i can reuse stuff between projects.
 
I also suggest you improve your communication skills, you came across as arrogant and ignorant (not only on the english language)
 
I also think that MCC is rubbish, but i think most code generators and frameworks are.
 
*you talk about pics,  but remember that there have been 16 and 32 bit parts for at least a decade, their architectures being designed with C in mind, so technically speaking, a C compilers for PICs in general makes total sense :P
#9
JPortici
Super Member
  • Total Posts : 433
  • Reward points : 0
  • Joined: 2012/11/17 06:27:45
  • Location: Grappaland
  • Status: offline
Re: Pic Programming Language 2018/10/28 18:47:00 (permalink)
+7 (7)
Dude, i'm italian.
I think you had a few too many before this rant
#10
katela
Super Member
  • Total Posts : 982
  • Reward points : 0
  • Joined: 2013/06/11 05:25:18
  • Location: South Africa
  • Status: online
Re: Pic Programming Language 2018/10/28 18:58:59 (permalink)
+4 (4)
What does the USA or any other country has to do with PIC compilers? His arrogance and anger/hatred is misplaced.
 

Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
YouTube Tutorials: https://www.youtube.com/user/StudentCompanionSA
#11
dan1138
Super Member
  • Total Posts : 2868
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/28 19:55:48 (permalink)
+2 (2)
In post #1 Alessandro asserted: "1-I was stupid, 2-it was to complex for me."

Choice 1 seem favorite now that he has been banned.

First DarioG now Alessandro is there something in the air in Europe that's loosening screws?
#12
NKurzman
A Guy on the Net
  • Total Posts : 16568
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/28 20:09:49 (permalink)
0
Well this post has gone off the rails rather quickly.
I to do not believe MCC makes good Code either. (Usable, but not good) but since I a stupid C programmer I guess my opinion is irelivent.
Have fun developing your new language.
It will be interesting to see it Crush C and ASM.
#13
Gort2015
Klaatu Barada Nikto
  • Total Posts : 2740
  • Reward points : 0
  • Joined: 2015/04/30 10:49:57
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/29 07:14:20 (permalink)
0
What an idiot, I've seen this type of post on Youtube.
 
They are known as flat Earth retards, they start off normally, by the 2nd or 3rd post they insult everyone because they think they have some great secret.

MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
https://www.youtube.com/watch?v=Iu1qa8N2ID0
+ ST:Continues, "What Ships are Made for", Q's back.
#14
NKurzman
A Guy on the Net
  • Total Posts : 16568
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/29 07:17:50 (permalink)
+3 (3)
Gort2015
What an idiot, I've seen this type of post on Youtube. They are known as flat Earth retards, they start off normally, by the 2nd or 3rd post they insult everyone because they think they have some great secret.

But PICs are flat. And all the other circuits revolve around them, no matter what the EEs May say.
#15
Gort2015
Klaatu Barada Nikto
  • Total Posts : 2740
  • Reward points : 0
  • Joined: 2015/04/30 10:49:57
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/29 07:26:23 (permalink) ☄ Helpfulby Jim Nickerson 2018/10/29 07:34:12
+2 (2)
They have members all around the Globe.
 
Was DarioG banned?
He kept saying that all Humans must die (except for himself, delusional)

MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
https://www.youtube.com/watch?v=Iu1qa8N2ID0
+ ST:Continues, "What Ships are Made for", Q's back.
#16
1and0
Access is Denied
  • Total Posts : 8460
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Pic Programming Language 2018/10/29 09:24:01 (permalink)
0
Mephobia.
 
#17
Jan Audio
New Member
  • Total Posts : 27
  • Reward points : 0
  • Joined: 2018/09/24 08:12:24
  • Location: 0
  • Status: offline
Re: Pic Programming Language 2018/10/29 09:39:05 (permalink)
0
You know people can bring a forum down with this stuff.
Here they always provide a solution to the problem no matter what they say.
Best tactic to keep them away.
#18
NorthGuy
Super Member
  • Total Posts : 5076
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: offline
Re: Pic Programming Language 2018/10/29 09:55:08 (permalink)
+2 (2)
The guy wanted to create a new language for PIC. He expected some sort of discussion. Instead, he's got offended from the start. This is certainly not very welcoming, but this sure is not a reason for him to get ballistic. May be it's somehow possible to start over and find peace?
 
There are lots of compilers - several basics, at least 3 different C compilers, pascal, yapl(?), others. In reality, not that many people use anything except for XC8 (and assembler perhaps). IMHO, if you want to come up with a new language, the very least you need to start is a working compiler.
 
#19
1and0
Access is Denied
  • Total Posts : 8460
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Pic Programming Language 2018/10/29 10:21:16 (permalink)
+1 (1)
Others have tried to create new languages for PIC. Personally, I have discussed/answered/helped with at least two persons in this forum, where one tried to create a simplified variant of a C compiler and another tried to create an assembler based on MPASM macros. The issue with this endeavor is not many (if any) will use this "new language".
#20
Page: 1234 > Showing page 1 of 4
Jump to:
© 2018 APG vNext Commercial Version 4.5