PDA

View Full Version : Some questions about WRITECODE



The Master
- 16th April 2008, 12:50
Hi. Ive had a search around the forums but i didnt find anything that answers these questions (unless i just didnt understand it)

Would i be right in saying that WRITECODE will write to the same place as my PIC programmer? I did read something about erasing before writing. I cant find an erase command on the commands list but would using it make the chip asif it was never programmed?

Assuming that WRITECODE does what i think it does then does that mean i can re-program a chip through serial without using ICSP?

duncan303
- 16th April 2008, 13:13
Would i be right in saying that WRITECODE will write to the same place as my PIC programmer?

I assume you mean code space as appose to eeprom, the answer is yes. you need to choose a suitable address to writecode to, otherwise you can overwrite active program memory. I allocate an area as far away from the active space as possible.




I cant find an erase command on the commands list


which programmer was that?


________________

Charles Linquis
- 16th April 2008, 13:22
You have to erase a "block" of memory with ERASECODE before you can write to it. Depending on your device, the size of the erase block and the size of the write block can vary. And sometimes the erase block size is different than the write block size. The datasheet generally explains this.

If you have a device larger than 65K in FLASH, you will either have to use PBPL 2.50, modify your PBP 2.47 libraries, or write an assy language routine to get to the upper half.

The Master
- 16th April 2008, 13:27
Yeah. Ive donw EEPROM before. Im talking about the program code.

Not a programmer. Its a site i found on google that lists the commands PBP supports http://www.rentron.com/PicBasic2.htm
Is there a better list somewhere?

So it is possible to overwrite active program memory? Would it be possible to overwrite the whole chip? The only problem i can think of is that the code space is usually bigger than the ram on the chip so that would require multiple serin commands and once it gets overwritten then it doesnt work again.

If i wanted to write just a little bit of code onto the chip then how does that work? To run it do i just tell the chip to goto the address of the first line or something?

Ive never programmed a chip to reprogram itself before. It sounds like something that would be very usefull to know

duncan303
- 16th April 2008, 13:41
Is there a better list somewhere?

Do you have a manual ?

Hi Charles,
absolutely right, I forgot about the 18F needing erasecode :(




_________________________

The Master
- 16th April 2008, 13:42
Do you have a manual ?

Nope. Should i have?

Edit: Can it be downloaded?

skimask
- 16th April 2008, 13:47
Nope. Should i have?
Edit: Can it be downloaded?

?????????????????????????????????????????????????? ????????????????????????????????????
Ding.... You're done....

The Master
- 16th April 2008, 14:33
?????????????????????????????????????????????????? ????????????????????????????????????
Ding.... You're done....

What do you mean?

skimask
- 16th April 2008, 14:41
What do you mean?

Post #5 says it all...at least all I need to know...

The Master
- 16th April 2008, 14:45
Ok, so i need a manual. Where do i get one from? (preferably a downloadable one)

skimask
- 16th April 2008, 14:50
Ok, so i need a manual. Where do i get one from? (preferably a downloadable one)

Well, if YOU had BOUGHT a LEGAL copy of PicBasicPro from an authorized distributor (not some WAREZ site), YOU would already have a manual, and you wouldn't need to DOWNLOAD a manual.

(Master.....ffffffffffffft)

The Master
- 16th April 2008, 14:54
I dont use werez or any other illegal things at all. Im not sure where i got PBP from. It might even be a demo.

Didnt we go through this once before?

Im sure im using some kind of free version of it. Not sure if thats a demo or an older version or what. I know i downloaded it from a website (i havnt even got filesharing apps installed)

The Master
- 16th April 2008, 14:59
Youve got me wondering now. Is there a way i can check if its legal or not? I know its possible that the site i got it from could have been advertising it as a free version when it shouldnt have

duncan303
- 16th April 2008, 16:24
Mmmmmmmm
It might even be a demo

Writecode amongst many other facilities you discuss are not available in the Demo version plus the fact that that you don't know where you got it from is probably enough of an indication that you have a hooky copy.
Without a licence, you of course cannot obtain a manual.

Does any of this matter,
and why should it clearly upset people who have been trying to help you. Of course it is possible to feign ignorance and plead innocence but the fact remains that it could demonstrate an unwillingness to make a contribution, leeching in another moral sense.

Are you committed to using PBP or are you a deadweight, is it any surprise that when it is discovered that you have not been rowing with a proper oar, that you find yourself overboard.

The conundrum is that you have made yourself highly visible, your business your friends etc
so I suspect that the jury could still be out on this one. you have been posting for nearly two years now, and the vast majority of your questions could have been answered if you owned the manual.

So you are asking people here to read the copies they have purchased and answer the questions you pose, because you have made a deliberate decision not to purchase a licence/manual.

I haven’t looked but i wonder if even the demo version is time limited, however nobody can force you to do the right thing, so I suppose its up to you.

Are you into PBP.............. Somebody might throw you a life jacket,


but for the moment I would conserve your energy as much as possible


____________________

skimask
- 16th April 2008, 16:36
I know i downloaded it from a website
DUH! You sure as heck didn't download it from a septic tank...



Does any of this matter,................
but for the moment I would conserve your energy as much as possible
And yet again, You have single-handledly performed what I consider impossible. That's twice in a day! :D

The Master
- 16th April 2008, 16:38
I dont quite get what half of that means but it appears you are saying this version i have is most likely illegal. Its uninstalled from my PC (will uninstall from my laptop when i get to it) and i will buy a proper copy. Shame i cant remember where i got it from. They should be shut down.

The reason i chose a free version is because i dont use it a lot and when i do its not for anything that i could sell so i looked around for a free version and found this one somewhere

The Master
- 16th April 2008, 16:41
DUH! You sure as heck didn't download it from a septic tank...

Lol. I downloaded it from a website as aposed to werez etc. I am actually against software piracy so nothing like that is installed on any of my PCs. Im going to buy the software properly and ill buy a disk instead of a download so its completely obvious that its legit

duncan303
- 16th April 2008, 16:50
That's twice in a day! :D

Thankyou good sir :)

it must be the influence of the imaginary forum moggy, whose litter I note has mysteriously disappeared :D

_______________________

The Master
- 16th April 2008, 16:57
Can i just ask. Why would i need PIC basic pro over normal PIC basic? The prices are about £100 apart and im a little short on cash at the moment. Whats so special about the "pro" part?

duncan303
- 16th April 2008, 17:21
The reason i chose a free version is because i dont use it a lot and when i do its not for anything that i could sell so i looked around for a free version and found this one somewhere


The respectfull suggestion was to conserve energy, probably best not acheived by squirming, as far as I know there has not even been a vote to turn the boat around, furthermore I do not recall anybody shouting "man overboard", so it may be some time.


____________

skimask
- 16th April 2008, 17:27
Lol. I downloaded it from a website as aposed to werez etc. I am actually against software piracy so nothing like that is installed on any of my PCs. Im going to buy the software properly and ill buy a disk instead of a download so its completely obvious that its legit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^

Anybody else buying this?

skimask
- 16th April 2008, 17:28
it must be the influence of the imaginary forum moggy, whose litter I note has mysteriously disappeared
Ok, there you did it...
Made a reference that I don't understand...
But you are, nonetheless, on a roll...

duncan303
- 16th April 2008, 17:44
Ok, there you did it...
Made a reference that I don't understand...
But you are, nonetheless, on a roll...


I had a vision of a very disgruntled (imaginary) cat, not only losing its tray to be temporarily used as a PCB developing tray(my ref), but to then have the contents commandeered by you inside your makepiece particle accelerator :D

___________

skimask
- 16th April 2008, 18:41
I had a vision of a very disgruntled (imaginary) cat, not only losing its tray to be temporarily used as a PCB developing tray(my ref), but to then have the contents commandeered by you inside your makepiece particle accelerator :D


After a brief Google search on the term 'moogy', I now fully understand references made in this thread...
And I laugh...and continue...
I now have my own vision...of a primate launching high velocity fecal matter...very similar to your 'moogy' and particle accelerator theory.

falingtrea
- 16th April 2008, 18:43
From the website:

This demo version of PICBASIC PRO™ Compiler supports a limited number of PICmicro® MCUs and is limited to 31 lines of source code (comments and whitespace are not counted). You may use this download to evaluate the compiler before purchasing the full version.

Demo version PICmicro® MCU support:

PIC12F683, 16F627(A), 16F628(A), 16F84(A), 16F688, 16F690, 16F870, 16F871, 16F872, 16F873(A), 16F874(A), 16F876(A), 16F877(A)

PICBASIC
Limited to first 2K code space.
Interrupt handlers must be Assembly language.
Uses Peek and Poke commands to access internal registers and move contents to and from pre-defined variables.
Some built-in commands can only be used on PortB, PortC or GPIO. While all ports may be accessed with Peek and Poke, some aren't available for commands like Serout, Pulsin, etc.
Clock speed pre-defined at 4MHz.
BASIC Stamp I compatible variable names pre-defined.
Most 14-bit core PICmicro® MCUs supported.

PICBASIC PRO
Uses all available code space.
Interrupt handler routines may be either PICBASIC PRO or Assembly.
Internal register names may be used directly, even in calculations and conditional statements.
Software-based commands may be used on any available port/pin. (Commands that utilize a hardware module are limited to the pins dedicated to that module. Some pins have special characteristics that might cause compatibility issues.)
Clock speeds from 3.5975 to 48MHz, depending upon device capabilities.
Define your own custom variables, including arrays of bits, bytes or words.
ALL PICmicro® MCUs are supported, including 12-bit core, 17CXXX, 18CXXX, and 18FXXX.

Additional commands available only in PICBASIC PRO:
LCDOut / LCDIn - for controlling parallel interfaced LCD modules.
HSerin / HSerout - for controlling the hardware USART available on many PICmicro MCUs.
HPWM - for controlling the hardware PWM modules available on many PICmicro MCUs.
Serin2 / Serout2 - RS-232 serial commands capable of sending and receiving ASCII formatted numeric data. Serin2 can be invoked with a timeout parameter to avoid lockup caused by missed serial data.
Select Case - Visual BASIC style case statement.
ReadCode / WriteCode - read and write locations in the code space of self-programming microcontrollers.
OWin / OWout - communicate with One Wire devices.
USBin / USBout - access the USB module on specially equipped microcontrollers.
Xin / Xout - send and receive X-10 commands for household remote control.
ADCin - perform analog-to-digital conversion on devices so equipped.

mister_e
- 16th April 2008, 18:57
Can i just ask. Why would i need PIC basic pro over normal PIC basic? The prices are about £100 apart and im a little short on cash at the moment. Whats so special about the "pro" part?
PBP have more useful built-in features than PBC. This saves you to do your own SHIFTIN/SHIFTOUT, LCDOUT, more advancaed IF-THEN-ELSE structure etc etc etc.

Better reference at the following link
http://www.melabs.com/products/comp_pro.htm
<hr>

Oups... never saw Tim's post :o

The Master
- 16th April 2008, 21:00
Right. Looks like i will be needing PBP then. Im not going to be able to afford it yet but i think i can live without it for a while. If im desperate i will download the demo from the site.

skimask: I honestly dont have any filesharing apps installed. I would be happy to prove that in any way you can think of. Proving something like that over the net is difficult though

skimask
- 17th April 2008, 00:26
skimask: I honestly dont have any filesharing apps installed. I would be happy to prove that in any way you can think of. Proving something like that over the net is difficult though
I don't need proof that you don't have any file sharing app's installed, because I already know that you DO have a file sharing application installed...Everybody that runs Windows or Linux or any other operating system has a file sharing application installed....it's called an 'Internet Browser'...and in the cases of Internet Explorer and Firefox, usually 'Right-Click', 'Save As' is all a person needs...that and maybe a bit of surfin' Google.
'nuff said...
Stop back when you get a little green manual...and if you don't know what that means, you will eventually...

Darrel Taylor
- 17th April 2008, 02:22
If it's a question of the Lump Sum required to buy PBP.

Another convenient option is http://compilespot.com/

Last I checked it's about $25 for a full months use of PicBasic Pro.

Not sure, but you must be able to get the manual from there too.
They can't expect you to use it without one (I'd assume).
<br>

The Master
- 17th April 2008, 09:01
Yes i have IE installed. Infact since im a web developer i have something like 20 browsers installed. They are classed as "browsers". Yes it is possible to download files (which is obviously what i did). Usually "filesharing apps" refers to things like werez, kazaa etc none of which i have installed. I even pay for my music which is more than most people.

Im not going to buy just a months usage. Im going to buy the full thing and im going to buy it from this site just to be on the safe side

The Master
- 24th April 2008, 18:30
Hello again! I got paid the other day so ive ordered PBP from www.crownhill.co.uk. If anyone doesnt believe me ive put "Spook Technologies" on the order and my name "Paul Smith" so you can check with them that an order has actually been placed.

I would appreciate it if people wouldnt jump to conclusions so fast. Either 1 of 2 things happened. I was using the demo in which case you think i should buy it anyway because i use it a lot, or i downloaded a version which isnt exactly legit and i didnt know it. Either way it seems you think i need to buy it so i have done. Hopefully this will proce that my intentions are good. I would like it if you didnt accuse me of illegally downloading software without good proof too. The only fact is that i hadnt paid for it. That doesnt mean its illegal. As i have said before when you said there was the possibility that it wasnt legal i removed it from my PC.

Just to clarify things. I do have web browsers installed on my PC. The correct statement should be "I do not have any P2P apps installed". I do not illegally download anything unless it appears genuine and i havnt picked up on it. That goes for software and music. Please, nobody make any claims that my vinyl collection was illegally downloaded :p (joking)

When PBP arrives i will make it my first job to read the manual that comes with it. Most of the questions i have asked here are about the circuits themselves so after reading the manual i shouldnt have many (if any) programming questions.

duncan303
- 25th April 2008, 08:51
Hi Paul,

Great to have you on board, PBP is expensive over here and it is a shame the exchange rate is so poor at the moment, so that was a big decision. You have really stepped up to the mark :)

I was wrong to say that most of your questions could be answered by the manual, you are quite correct in that your posts are mainly general electronic, sorry :o

No matter what the green stuff is on the outside of a PCB, who on earth chose that hospital green on the outside of the manual!! :D




Duncan

The Master
- 25th April 2008, 09:51
Ive not read the manual yet (not arrived yet) but its possible that most of my programming questions could be answered by it although im quite good at programming so i dont ask many of them.

I do agree, from the picture ive seen, i wouldnt have chosen that color for the manual

mackrackit
- 25th April 2008, 10:04
No reason not to have read the manual. It is right here.
http://www.melabs.com/support/index.htm

The Master
- 25th April 2008, 10:27
I did find that the other day. Im gonna wait for the book though because if im reading it on the PC i will be tempted to stop reading and do something else and ive paid for the book so i might aswell use it.

Thanx anyway :)

duncan303
- 25th April 2008, 10:49
I agree. there is nothing yet to replace hard copy certainly for me. I print out everything I am using, datasheets etc (relevant sections). Apart from the fact I have to make the "file" I have printouts of at least the summary of ALL components as I purchase them with the order ref and supplier noted.

I just find I cannot reference material properly from the screen, I too get distracted.

of course the advantage for Paul is that he will have the latest manual 7/07 or later, the melabs version on the web site is 5/02 and does not cover PBP 2.50


Time to put the kettle on.........anyone for tea??

Duncan

___________________

mackrackit
- 25th April 2008, 11:30
of course the advantage for Paul is that he will have the latest manual 7/07 or later, the melabs version on the web site is 5/02 and does not cover PBP 2.50

Never noticed that, just figured it was being updated.

The Master
- 25th April 2008, 14:59
I didnt notice that either. I hardly use hardcopy for anything. Even datasheets i have on my PC but i have an advantage because i have more than 1 screen so i can look at the datasheet and my work at the same time. Reading a long manual is a little different though. All i have to do is check the user CP on one of the forums i usually have open and i might end up replying to something.

The only problem i have with datasheets on the PC is that they are all in PDF format. Adobe make good software but it all takes so long to load and slows my PC down :(