+mytek Posted January 13, 2016 Author Share Posted January 13, 2016 After this, I tried adding a 2n2222 transistor at the output of CLOCK signal, as an emitter follower with a 1k resistor from emitter to ground and an 4.7nf capacitor in parallel, keeping the 2k2 resistor and LED in the DATA line. This worked in all my PICs: This sounds good, and of course I'll want to test with a PIC16F1847, but I need to verify what the values of everything else is at this point. 2N2907's for VDD and VPP switches? 1K PIC CLK pull-up? And back to 2.2K PIC DATA pull-up with series LED, but now feeding into 2N2222 emiter-follower buffer with 1K impedance and parallel 4.7NF capacitor? I will also try with 74HCT14 as well, and then decide which way makes the most sense. Thanks for all the testing - Michael Quote Link to comment Share on other sites More sharing options...
dmsc Posted January 13, 2016 Share Posted January 13, 2016 Hi!, This sounds good, and of course I'll want to test with a PIC16F1847, but I need to verify what the values of everything else is at this point. 2N2907's for VDD and VPP switches? 1K PIC CLK pull-up? And back to 2.2K PIC DATA pull-up with series LED, but now feeding into 2N2222 emiter-follower buffer with 1K impedance and parallel 4.7NF capacitor? This is my current test circuit: I will also try with 74HCT14 as well, and then decide which way makes the most sense. Thanks for all the testing Note that with an 74HCT14, as it is an inverter, you should use two in series or modify the program to invert the clock. I should get some of those for myself, should be useful for interfacing to the Atari... Good luck! 1 Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 13, 2016 Author Share Posted January 13, 2016 Got it! There I go mixing up the CLK and DATA lines again. I swear I must be dyslexic at times Thanks, - Michael Quote Link to comment Share on other sites More sharing options...
ricortes Posted January 13, 2016 Share Posted January 13, 2016 All solutions so far, and understand that I like them because of simplicity/low part count, are just trying to clean up a bad situation with switching wave forms. It may be a better design choice to use a latch. That is, when you want to set a data state you clock a latch to put it into proper state. If the right data is clocked a single time or a dozen times it shouldn't matter. Just a FYI that doesn't matter much, I've driven J/S ports at a bit banged 19,200 baud and it worked reliably using an ST and IBM 286 clone as the receiver. If the built in delays and wait time to sample of RS232 can get it right IMO it is all about the switching. Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 14, 2016 Author Share Posted January 14, 2016 (edited) All solutions so far, and understand that I like them because of simplicity/low part count, are just trying to clean up a bad situation with switching wave forms. It may be a better design choice to use a latch. That is, when you want to set a data state you clock a latch to put it into proper state. If the right data is clocked a single time or a dozen times it shouldn't matter. Good idea ... However putting any IC (including the 74HCT14 as previously suggested) into the mix, perhaps unnecessarily complicates the design, as well as increases the PCB footprint. If I keep the PCB very small the OSH Park board cost remains cheap. And although I wouldn't normally recommend buying the parts from Radio Shack, the present design can probably be built from what they stock, or can likely be found in an electronic hobbyist's parts box. Anyway the good news is that I tested the latest design changes by Daniel (V8) and it works perfectly with a PC16F1847. So that means the 4 currently supported PIC chips all work with this hardware. And since those chips cover a pretty good range of applications, I think we are getting close to finalizing this puppy. Not to say that more PIC's won't get added over time, but based on the results thus far and how the V8 hardware looked on the scope, I suspect that adding more devices should give good results as well. As far as adding more devices, I might try my hand at adding a PIC18F14K50 which has a USB 2.0 compliant interface, a good amount of program space, and all the other usual bells and whistles. When looking at OctoPart the price per chip seems to be pretty consistent at $2.39 for PDIP and $2.10 for SMD. It would be nice to have a USB capable chip that the JOY2ICSP could program. - Michael Edited January 14, 2016 by mytekcontrols Quote Link to comment Share on other sites More sharing options...
dmsc Posted January 14, 2016 Share Posted January 14, 2016 (edited) Hi!, Good idea ... However putting any IC (including the 74HCT14 as previously suggested) into the mix, perhaps unnecessarily complicates the design, as well as increases the PCB footprint. If I keep the PCB very small the OSH Park board cost remains cheap. And although I wouldn't normally recommend buying the parts from Radio Shack, the present design can probably be built from what they stock, or can likely be found in an electronic hobbyist's parts box. Anyway the good news is that I tested the latest design changes by Daniel (V8) and it works perfectly with a PC16F1847. So that means the 4 currently supported PIC chips all work with this hardware. And since those chips cover a pretty good range of applications, I think we are getting close to finalizing this puppy. Not to say that more PIC's won't get added over time, but based on the results thus far and how the V8 hardware looked on the scope, I suspect that adding more devices should give good results as well. Good, I think that this is the simplest circuit that will work across so many different PICs. Today I tried adding an 74LVC14 to the clock line (it was the only schmidt triggered ID I had), and it was not so easy. The problem is that the 74LVC is *so* fast that it toggles with the noise in the Atari outputs, see this image (magenta is the Atari CLOCK output, cyan is the 74LVC14 output, yellow is the Atari DATA output): The output is so noisy because in low state there is only the pull-up driving the line. Adding the 1k pull-up resistors attenuates the noise, but also attenuates the signal, so it does not always work. My final solution was adding an 2k2 pull-up resistor plus the 4.7nF capacitor, this removes almost all the noise and makes the transitions smooth, see: With this setup, all my PICs work, but I think that the previous solution with the transistor is better. I think that newer PICs had problems before because the inputs are faster than old PICs, so are similar to the 74LVC inputs, my new measurements tend to support that. As far as adding more devices, I might try my hand at adding a PIC18F14K50 which has a USB 2.0 compliant interface, a good amount of program space, and all the other usual bells and whistles. When looking at OctoPart the price per chip seems to be pretty consistent at $2.39 for PDIP and $2.10 for SMD. It would be nice to have a USB capable chip that the JOY2ICSP could program. Programming a PIC18F is possible in theory, but the programming algorithm is different than in the PIC16F, so we will need to write new programming code in assembler. Why not something like the PIC16F1454, that has clock recovery from USB, so it does not even needs a crystal to work? I don't personally like PICs that much, mostly because the compilers are not very good (or non-free) and the architecture is really limited, I would prefer adding support for AVRs (but AVRs need one extra pin to program in low voltage mode and two extra pins in high voltage mode), or some cheap ARM 5V compatible micro like the MKE04Z8VWJ4 or the CY8C4013SXI Edited January 14, 2016 by dmsc 2 Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 14, 2016 Author Share Posted January 14, 2016 Yes I totally agree that the PIC16F1454 is a far better choice for what has been done in the software already, and about a $1 cheaper as well (OctoPart Search). Although you were able to squeeze some nice wave forms out of the 74LVC set-up, I also agree that we should just stick with the V8 transistor only circuit. So unless you see a reason not to, let's freeze the design at that version and consider it done. And since this hardware is really only usable for the PIC, I think I'll go with the name JOY2PIC instead of JOY2ICSP for the PCB. Later if you or someone else cares to take up the reins for an AVR or ARM version, we can just change the suffix to suit the new hardware. If only history had gone differently, we could have had similar devices based on the 6502/65816 architecture and code base, now wouldn't that have been sweet - Michael Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 20, 2016 Author Share Posted January 20, 2016 (edited) Here's the preliminary PCB layout based on the V8 schematic (Dimensions: 0.80" x 1.70")... TOP - BOTTOM - GND PLANE I still need to double check everything, but I believe this is real close to final. - Michael EDIT: The ICSP connection is the same as used on the PICKIT 2&3 programmers, so cabling and adapter boards will be interchangeable. Edited January 20, 2016 by mytekcontrols 4 Quote Link to comment Share on other sites More sharing options...
Kyle22 Posted January 20, 2016 Share Posted January 20, 2016 (edited) That looks great, but it looks to me that the ICSP connector should be soldered to the bottom of the board. is that correct? Compare pinout here: http://www.sunrom.com/p/universal-device-programmer-autoelectric-tl866a Edit: in other words, the standard pin 1 is on the left, and yours is on the right. Edited January 20, 2016 by Kyle22 Quote Link to comment Share on other sites More sharing options...
dmsc Posted January 20, 2016 Share Posted January 20, 2016 Hi!, That looks great, but it looks to me that the ICSP connector should be soldered to the bottom of the board. is that correct? Compare pinout here: http://www.sunrom.com/p/universal-device-programmer-autoelectric-tl866a Edit: in other words, the standard pin 1 is on the left, and yours is on the right. Not really, the standard is pin 1 in the right, see: I think that it is the TL866a that is inverted 1 Quote Link to comment Share on other sites More sharing options...
Kyle22 Posted January 21, 2016 Share Posted January 21, 2016 What really matters is the little plastic tab on the connector. See it sticking out above the pins in the above pic? On the 866, it is below the pins. It only allows the cable to plug in one way, so we need to mount it correctly. Left or right makes no difference, but it needs to be clearly documented. Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 21, 2016 Author Share Posted January 21, 2016 (edited) Just for clarification... Here's an image that shows the relationship of the pin #'s vs the pin assignments for the PICkit 2 (PICkit 3 is the same). And here is an example of an ICSP header on the target PCB (without the optional LV Programming pin 6). And here is what a normal PICkit ICSP cable looks like. Pin 1 being on the left or right really isn't an issue, since this is a single inline header connection and can be flipped to match. That is also why I labeled the pins with their actual function just to make it more fool proof. - Michael EDIT: although the PCB silkscreen shows a latched header, I would recommend using a non-latched version, and then just pay attention to the function labels. And here is an example of how the D-Sub 9 joystick connector will be implemented, since there was some confusion about that earlier. I will strip down a standard solder cup version by eliminating its normal metal shell and mounting ears, and then apply a small drop of superglue to hold the two blue plastic halves together prior to soldering to the board. Essentially it gets treated like a surface mount connector. Edited January 21, 2016 by mytekcontrols 2 Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 21, 2016 Author Share Posted January 21, 2016 (edited) Final PCB Layout (inserted missing trace, changed to a narrow un-keyed SIP header for the ICSP connection, and reduced the board length)... TOP - BOTTOM - GND PLANE Board Dimensions: 0.80" x 1.575" Note: Silk Screen will only appear on top side of board. Will be using Jameco P/N 153700 (or similar) for the ICSP SIP Header. Just about ready to send this off to OSH Park for fabrication. - Michael Edited January 21, 2016 by mytekcontrols 2 Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 23, 2016 Author Share Posted January 23, 2016 (edited) And here is the schematic that goes with that PCB layout, which also includes a simple B.O.M. I just sent the PCB file off to be gerber'ized. So by this weekend OSH Park should have it in their system. I'll post a link to the shared production file if anyone would like to have a few fabricated for their own use. You know the cool thing about all this, is that this project started merely 2 months ago, and here we are already reaping the rewards. And it goes without saying that I could not have done this without Daniel's (dmsc) massive effort and creation of the application program, as well as developing much of the hardware design that I turned into a physical reality. - Michael Edited January 23, 2016 by mytekcontrols 1 Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 23, 2016 Author Share Posted January 23, 2016 Boards are now ready to be ordered at: https://oshpark.com/shared_projects/Hg69Zq6i Minimum order quantity is 3 pieces, but I wanted to give away some of these as gifts so I doubled the order. At this quantity they cost $2.12 a piece (not bad ). - Michael 3 Quote Link to comment Share on other sites More sharing options...
+mytek Posted February 3, 2016 Author Share Posted February 3, 2016 Just got an email today from OSH Park saying that my JOY-2-PIC boards have shipped . So by early next week I should have time to assemble a couple and verify operation. - Michael 1 Quote Link to comment Share on other sites More sharing options...
kenames99 Posted February 4, 2016 Share Posted February 4, 2016 hi Michael, feel free to send me one. oshpark messed up my first prder so i wont be doing business with them again. Ken Quote Link to comment Share on other sites More sharing options...
+mytek Posted February 4, 2016 Author Share Posted February 4, 2016 hi Michael, feel free to send me one. oshpark messed up my first prder so i wont be doing business with them again. Ken That's odd, I've never had any problems with OSH Park on any of my orders. Can you elaborate on what went wrong? Perhaps it was something incorrect on my link? And I hope you don't take offense, but not doing business with someone over one mistake seems a bit drastic, unless they refused to make it right. Unfortunately the boards I have coming are already spoken for, plus I'll be keeping at least two for myself. However if I decide to order more, I'll keep you in mind. - Michael Quote Link to comment Share on other sites More sharing options...
kenames99 Posted February 4, 2016 Share Posted February 4, 2016 you link was fine. the bourd house messed up and rotated pads.made for not to spec boards. a first order sets the tone for future orders. they did remake the boards and are sending correct ones now but my other supplier could have got them done and shipped sooner. i asked for you to send me a prommer board because the gerbers are not available, but it is a small circuit and i can replot the board easy enough. Ken Quote Link to comment Share on other sites More sharing options...
+mytek Posted February 4, 2016 Author Share Posted February 4, 2016 (edited) you link was fine. the bourd house messed up and rotated pads.made for not to spec boards. a first order sets the tone for future orders. they did remake the boards and are sending correct ones now but my other supplier could have got them done and shipped sooner. i asked for you to send me a prommer board because the gerbers are not available, but it is a small circuit and i can replot the board easy enough. Ken Interesting. I wonder how they made that kind of mistake??? Sorry to hear that things didn't go well for you, although I am surprised that you got your boards before me, since I was obviously the first to order and then post a link. If it's gerbers you wanted, all you had to do was ask. Although I was holding off on posting these files until I had tested a completed version (gerbers and design files attached). - Michael P.S. Just so you know, what I do within this community is as a hobbyist and not a product marketer. Primarily my creations are for my own curiosity first, and then if I think the community will benefit, the designs are released into the wild. As part of this creation process I sometimes find myself with extra boards, and these I will share with individuals that I feel added something of value to the project. JOY-2-PIC_pcb.zip Edited February 4, 2016 by mytekcontrols 1 Quote Link to comment Share on other sites More sharing options...
kenames99 Posted February 4, 2016 Share Posted February 4, 2016 hi Michael, I was kinda waiting for that also. testing the final product is always essential. also, I have not recieved the boards yet. still waiting.... thanks for the gerbers! I will hold off on using them until you verify the boards. Ken 1 Quote Link to comment Share on other sites More sharing options...
+mytek Posted February 6, 2016 Author Share Posted February 6, 2016 (edited) Got my boards yesterday, and so far they look good. Although I haven't had a chance to assemble one and test it, so fingers crossed. I do see two small problems, one is my fault and that is I didn't precisely line up the pads to the D-Sub9 connector pins, but in reality this doesn't appear to be an issue. And the other problem relates to part of the silk screen image for the PN transistors failed to print (the rounded portion). This also won't be an issue, but it is strange considering that it did show up on their preview. Hopefully I'll get one of these assembled today and tested. - Michael EDIT: Might be the proximity to a pad that caused the silkscreen not to print. I see a similar affect on the ICSP header by pin 1. Edited February 6, 2016 by mytekcontrols 3 Quote Link to comment Share on other sites More sharing options...
+mytek Posted February 6, 2016 Author Share Posted February 6, 2016 Success! The new PCB version of the JOY2PIC programmer works But I did find one more error, and that was the LED silkscreen showed the 'flat' on the opposite side of where it should have been (incorrectly drawn component in the library). The image below shows it correctly installed. Also the capacitors and diodes are a bit too close together. So dependent on what type you are using it may require slightly raising one above the other to avaoid a squeeze like on my assembly. The 47NF I had laying around was very big due to the high voltage rating. A smaller capacitor with a much lower voltage rating would be preferred. When testing I programmed 3 chips. - Michael 6 Quote Link to comment Share on other sites More sharing options...
Kyle22 Posted February 7, 2016 Share Posted February 7, 2016 Very nice 1 Quote Link to comment Share on other sites More sharing options...
+mytek Posted February 7, 2016 Author Share Posted February 7, 2016 (edited) I'll do some checking at Jameco and/or Digi-Key and see what parts will work best and then do up a BOM that reflects this. I also changed C1 to a 0.1uf same as C2-C5 which appears to work fine (had the same on my breadboard prototype as well, and it also worked fine). This will keep things simpler. And I'll go in and make corrections on the silkscreen and the schematic, but unfortunately the silkscreen changes will not carry over to OSH Park, since I can't justify paying for another conversion to gerbers for something so trivial. Just remember to have the 'flat' side of the LED facing the ICSP header. - Michael P.S. Thank you Kyle EDIT: Ohh and before I forget, make sure to glue the two plastic halves of the D-Sub-9 connector together, else the next time you go to unplug it everything will fall apart. Either superglue or maybe better yet some good 2-part expoxy. As for removing the original metal shrouding and ears, I just used tin snips to cut the ears off close to the main shroud, and then it simply pulled it apart. Edited February 7, 2016 by mytekcontrols Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.