Share this project

Done

Share this project

Done
A 15cm Interactive Binary Ruler with Seven Logic Gates, Four Flip Flops and a Four Bit Binary Counter.
A 15cm Interactive Binary Ruler with Seven Logic Gates, Four Flip Flops and a Four Bit Binary Counter.
1,124 backers pledged AU$ 38,163 to help bring this project to life.
Kelly Lewis, Rene Brouwer, and 10 more people like this update.

Comments

Only backers can post comments. Log In
    1. Missing avatar

      Daehn on

      @Victor and other PicKit3 users: Successfully programmed the first board.

      I had a couple of questions myself initially - do you need to set the switch to On? - Do you have to have the battery inserted or can you power from ICSP? Answer is ICSP power is okay, power switch on the DigiRule does not matter.

      The process is straight forward if you go to: Settings -> Advanced Mode -> Power -> "Power target circuit from Tool"=yes
      (I am not sure yet when to make that setting, I believe after applying the Device and connecting to the PicKit Tool.)

      So the steps had been in particular:
      1. Download MPLAB from http://www.microchip.com/pagehandler/en-us/family/mplabx/
      2. Run the Integrated Programming Environment (IPE)
      3. In the Family select "Advanced 8-bit MCUs (PIC18)
      4. In the Device type "PIC18F43K20" and click on apply
      5. This might trigger a firmware upgrade on the PicKit depending on if Pic18s have been programmed recently.
      6. In the third combobox the PicKit3 should be found now - Click on Connect
      7. Say Okay to the warning about the voltage setting to be 3.25V
      8. Now 4 Leds are turned on proofing it is powered from the PicKit Tool (although the Power Switch is Off on the DigiRule. In the text area the text shows up: Programmer to target power is enabled - VDD = 3,25 volts; Target device PIC18F43K20 found. Device ID Revision = 2.
      9. Click on the Source -> Browse button and select the hex file to program.
      10. Hit the Program button and later the Verify.

    2. Bradley Slattery 7-time creator on

      @Robert Hetterle - The PICKIT2 is not an original however I have looked into it and microchip has released the PICKIT2 schematic and code as open source and as such, anyone is able to make their own version of the PICKIT2 (similar to an arduino I guess). I would not recommend that anyone purchase a copy of something unless it were open source.

      @Robert Ralston - I can't take the credit for the staggered holes. That idea came from Patrice Buriez - one of your fellow backers :) Also, you have now just given me a great idea for my future projects with using the EEPROM to hold version data - thanks!

      @Victor, unfortunately I have only used a PICKIT2 and so I wouldn't be able to provide any information regarding ICD3.

      @Rene - The hex file is also included in the download, so there is no need for you to compile it :) Although if you wanted to change the code then compile it, you will need swordfish basic.

      And lastly, you guys are exactly right about the flip flop issue. 1 1 is an invalid logic state for a SR (RS) flip flop, if you were to input that combination, it shows as two 0's on the Q and not Q outputs however my code should have reset this back to normal if you selected a different flip flop. Unfortunately I did not pick this error up in time. The latest version of code fixes this issue.

    3. Missing avatar

      Rene Caspari on

      How do I compile the BAS file to HEX dump using MacOSX? CLI tools preferred :-)

    4. Missing avatar

      Victor Tagayun on

      I try to use IPE here's the output:

      2015-12-10T00:20:54+0800- Completed loading IPE.

      2015-12-10T00:21:20+0800- Loading hex file. Please wait...
      Loading code from F:\Hobby\DigiRule\DigiRule-18F43K20-Modified-06-Dec-2015\DigiRule 18F43K20 Modified 06 Dec 2015.HEX...
      Warning: F:\Hobby\DigiRule\DigiRule-18F43K20-Modified-06-Dec-2015\DigiRule 18F43K20 Modified 06 Dec 2015.HEX contains code that is located at addresses that do not exist on the 11AA010.
      Code incompletely loaded.
      Warning: F:\Hobby\DigiRule\DigiRule-18F43K20-Modified-06-Dec-2015\DigiRule 18F43K20 Modified 06 Dec 2015.HEX contains code that is located at addresses that do not exist on the 11AA010.
      Code incompletely loaded.
      2015-12-10T00:21:20+0800- Hex file loaded successfully.

      *****************************************************

      Connecting to MPLAB ICD 3...

      Currently loaded firmware on ICD 3
      Firmware Suite Version.....01.40.05
      Firmware type..............PIC18F

      Target device was not found (could not detect target voltage VDD). You must connect to a target device to use ICD3.

    5. Missing avatar

      Victor Tagayun on

      My office has ICD 3, how to use?

    6. Missing avatar

      Robert Ralston on

      Opps, forgot to add: staggering the ICSP holes on the pcb was really smart; the header pins make a good connection for programming without soldering them. Brilliant !

    7. Missing avatar

      Robert Ralston on

      Firmware version 3 looks good on 3 DigiRules; switch bounce is gone and don't see any degradation of other features.

      When changing firmware, I find it useful to record the FW version to the device, which in this case, is very easy.

      In the PICKIT2 application, you can import the new hex file and, before writing it, change EEPROM values, then write. I'm changing the first 3 EEPROM bytes from FF FF FF to 46 57 33.

      If I read the code back from a DigiRule ( setting the EEPROM display to ASCII bytes rather than Hex Only ) F W 3 is displayed so I know what firmware version is on that particular DigiRule.

      But I'm also saving that configuration to a different hex file so the EEPROM values stay with the flash code.

    8. Missing avatar

      Robert Ralston on

      Wrote 3rd version of code to chip (DigiRule 18F43K20 Modified 06 Dec 2015.HEX).

      Changing the BtnDebounceTime constant from 7000 (2nd code version) to 10000 seems to have fixed the debounce problems.

      Were there other changes to the code?

      Will test extensively later with my other 4 DigiRules

    9. Missing avatar

      Robert Ralston on

      Wrote the code fix (DigiRule 18F43K20 Button Bounce Fix by Gav) to chip with PICKIT2 under Windows 10.

      Counting up or down with the binary counter works MUCH better.

      However, the debounce problem seems to remain if I invoke the hidden features. There, when counting up or down to specify which feature to run, the "skipping" or multiple counts per one button press remain, getting, in general, about 3 extra counts or presses per every 15 presses.

      Does the fix somehow not apply to the hidden features of DigiRulle?

      I'm assuming that there would be a single debounce routine which was modified ??

    10. Missing avatar

      Robert Hetterle on

      Addendum: I have discovered the same issues on my rulers, but hats off, how quickly you addressed and fixed the issue :)

    11. Missing avatar

      Robert Hetterle on

      A PicKit for $9 :O Is it fake or because the version 2 has been replaced by the PicKit3? I ordered one anyways, you can never have too many programmers :D

    12. Missing avatar

      Dominik on

      I found a little "Bug" in the FlipFlop section:

      - Set FlopFlop to SR Mode
      - Enable S
      - Enable R
      - Press C
      ---> Now Q and !Q will be dark.

      - Now set FlipFlop Mode to JK
      - Enable J and K
      - Press C
      ---> Pressing C will toggle both Q and Q! - but as they are both disabled, toggling will enable both of them.

    13. Nick D. Clements
      Superbacker
      on

      I think it's a conspiracy! @creator purposely coded the board wrong to get us all to buy PICKIT2 Programmers from aliexpress.com!!! -- Only Joking! -- I, like many others, am actually excited for the chance to get another level of interactivity out of my DigiRule, and would probably have ordered a PICKIT2 even if it did/does work perfectly. (Still waiting on mine so I can't confirm yet how it working...) -- Besides, like Mr. Weasley said, "Never trust anything that can think for itself if you can't see where it keeps its brain.”

    14. Mike Kasprzak on

      I ordered this PICKit instead:

      http://www.aliexpress.com/item/Free-shipping-PICKIT2-Programmer-PIC-ICD2-PICKit-2-Programming-Adapter-Universal-Programmer-seat/1291727442.html

      For less than $2 more, you get the ZIF socket adapter for chip programming too. :)

    15. Mike Kasprzak on

      Ha, I also ordered a PICKit, because it sounded fun. ;)

    16. Dr. Mathias Wilhelm
      Superbacker
      on

      Salut,
      just fashed the DigitRule with the new HEX and the bounce error is gone. Für alle aus Deutschland: Ich flashe gerne Eure DigiRules, wenn Ihr das Porto übernimmt, damit Weihnachtsgeschenke noch rechtzeitig unter dem Baum landen. Bezahlung mit Weihnachtsbrödle sind ok
      Ciao, Mathias

    17. Missing avatar

      Martin Tröger on

      Bradley, that's a business model! You should quickly negotiate commission with the programmer dealer ;-) Serious!

    18. Missing avatar

      Bernd on

      I've ordered a Pickit2 from Aliexpress as suggested. I played only with AVRs until now so I take this as a welcomed occasion to take a look at the other side of the (8bit-) Force. ;)

      Everyone who has already created a product knows that these things can happen even with apparently simple things. I suppose we're all techies and nerds here, so we can deal with that.

    19. Missing avatar

      Robert on

      HI, I haven't received my DigiRule yet. I have several PIC programmers but not that one. I will try the ones I have. If none of them work (which I doubt) then I'll order the PicKIT 2 that you mentioned.

      Once I have programmed mine. I can do the same for others at the cost of return postage if there are not too many of them. But I can't offer replacements for those lost in post. I am QLD Australia.

    20. Jaap Scherphuis on

      Thanks for releasing the source code. Even though I don't find the buttons a big issue (it's easy enough to correct errors) I ordered a PicKit because I think I'll have fun fixing the code and trying out a few more changes of my own.

    21. Missing avatar

      David Lang on

      I got mine last night, and I find that the buttons are a lot harder to press than I expected. I think this is leading to some of the button bounce issues.

      But if people really are unhappy with them, I'd sure like to get more :-)

    22. Lafazar
      Superbacker
      on

      Thanks for the instructions and order link.

    23. Missing avatar

      Andrea Repka on

      Thanks for the update! I just got mine in the mail yesterday and my buttons were not behaving either.