Some questions about WRITECODE


Closed Thread
Results 1 to 38 of 38
  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697

    Default Some questions about WRITECODE

    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?

  2. #2
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    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?


    ________________

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    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.
    Charles Linquist

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  5. #5
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Is there a better list somewhere?
    Do you have a manual ?

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




    _________________________

  6. #6
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by duncan303 View Post
    Do you have a manual ?
    Nope. Should i have?

    Edit: Can it be downloaded?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    Nope. Should i have?
    Edit: Can it be downloaded?
    ?????????????????????????????????????????????????? ????????????????????????????????????
    Ding.... You're done....

  8. #8
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    ?????????????????????????????????????????????????? ????????????????????????????????????
    Ding.... You're done....
    What do you mean?

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    What do you mean?
    Post #5 says it all...at least all I need to know...

  10. #10
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ok, so i need a manual. Where do i get one from? (preferably a downloadable one)

  11. #11
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    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)

  12. #12
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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)

  13. #13
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  14. #14
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    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


    ____________________

  15. #15
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    I know i downloaded it from a website
    DUH! You sure as heck didn't download it from a septic tank...


    Quote Originally Posted by duncan303 View Post
    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!

  16. #16
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  17. #17
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    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

  18. #18
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    That's twice in a day!
    Thankyou good sir

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

    _______________________

  19. #19
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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?

  20. #20
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    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.


    ____________

  21. #21
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    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?

  22. #22
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by duncan303 View Post
    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...

  23. #23
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    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

    ___________

  24. #24
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by duncan303 View Post
    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
    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.

  25. #25


    Did you find this post helpful? Yes | No

    Default

    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.
    Tim Barr

  26. #26
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    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
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  27. #27
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  28. #28
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    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...

  29. #29
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    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>
    DT

  30. #30
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  31. #31
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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 (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.

  32. #32
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    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

    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!!




    Duncan

  33. #33
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  34. #34
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    No reason not to have read the manual. It is right here.
    http://www.melabs.com/support/index.htm
    Dave
    Always wear safety glasses while programming.

  35. #35
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  36. #36
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    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

    ___________________

  37. #37
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by duncan303 View Post
    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.
    Dave
    Always wear safety glasses while programming.

  38. #38
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

Similar Threads

  1. Bootloader For 18F4520
    By isaac in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 24th March 2010, 17:56
  2. WRITECODE, ERASECODE, and interrupts
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th March 2010, 02:46
  3. WRITECODE stores wrong 14-bit word values in FlashMEM
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th June 2009, 04:35
  4. Can anyone help me to use Writecode for pic18f458 ?
    By dip1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 28th June 2006, 22:29

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts