Shop OBEX P1 Docs P2 Docs Learn Events
Before I damage my expensive C3...could someone clue me in on this behavior? — Parallax Forums

Before I damage my expensive C3...could someone clue me in on this behavior?

OK, this is where my electrical ignorance is going to show. I actually had some good progress today creating a VGA solution for my 65C02 based computer. But before I do that, I thought it would be easier to just use an Arduino to test connectivity and pass commands to the C3.

If you look at the attachment, you will see a breadboard. That breadboard is split in the middle, meaning that the left and right sides are normally isolated. So my logic was to let the Arduino provide both 3.3V and 5V power to the board where I will use level converters to talk to the C3. So it's hard to tell, but the right side has 5V and the left has 3.3V.

Now, I did proceed to connect a common ground to everything. Both sides of the breadboard, the Arduino and the C3. (Sorry, analog power is not my expertise!)

After doing so, everything works fine but I've noticed an odd (to me) behavior. Whenever I power cycle the Arduino, the C3 reboots and vice-versa. At the moment, the only connectivity they have is GND.

So I am curious as to why this happens and, more importantly, will I cause any damage anywhere?

Thanks for any information!
4032 x 3024 - 7M

Comments

  • IDK about the rebooting, but I can tell you that you don't really need proper level translators - just put a 3.3k series resistor in series and the Prop's internal clamp diodes will do the job.

    Ideally, you'd connect the power rails together and power everything from one supply.

  • frank freedmanfrank freedman Posts: 1,983
    edited 2020-07-17 03:01
    Ground loop somewhere in the mix, that would be the only thing I could think of. You have two different supplies, I suspect they are of the wall wart variety, so who knows how they are wired internally. Try running both from the a single supply if possible.
  • I agree with the both of you. But I'd give anything to find out about your R65C02 system there.
  • Cluso99Cluso99 Posts: 18,069
    Yes, it should be best to use the Arduino 5V and 3V3 supplies. But, is the 3V3 adequate (ie current) to supply the 3V3 circuits including the P1?

    Another point. When using breadboards, sprinkle some 100nF bypass caps around the rails, and a couple of 1uF tantalums would not go astray either, although currently you don't have anything on these breadboards. These all make for a quieter supply and less likely to suffer from brownouts.

  • Cluso99Cluso99 Posts: 18,069
    I agree with the both of you. But I'd give anything to find out about your R65C02 system there.
    Search potpurri6502 - google is your friend after examining the pic
  • cbmeekscbmeeks Posts: 634
    edited 2020-07-17 12:40
    Wuerfel_21 wrote: »
    IDK about the rebooting, but I can tell you that you don't really need proper level translators - just put a 3.3k series resistor in series and the Prop's internal clamp diodes will do the job.

    Ideally, you'd connect the power rails together and power everything from one supply.

    I was wondering about using resistors. Especially for prototyping. I will try that. Also, the Arduino and C3 are each powered via a USB cable from my PC at the same time.
    Ground loop somewhere in the mix, that would be the only thing I could think of. You have two different supplies, I suspect they are of the wall wart variety, so who knows how they are wired internally. Try running both from the a single supply if possible.

    Yes, two different supplies but from the same PC. The Arduino and C3 are powered via USB cables so that I can program them and power them at the same time.
    I agree with the both of you. But I'd give anything to find out about your R65C02 system there.

    :-)

    Back in late 2018, I designed and produced a SBC based on the 65C02. It was inspired by the "Circuit Potpourri" computer from the http://sbc.rictor.org/io/pckb6522.html site (Daryl Rictor). It was also inspired by the Apple II with it's four slots (that you can see a custom serial card I built for it in the picture). More info on my SBC can be found here:

    http://forum.6502.org/viewtopic.php?f=4&t=5331
    http://forum.6502.org/viewtopic.php?f=4&t=5333
    http://forum.6502.org/viewtopic.php?f=4&t=5345

    Cluso99 wrote: »
    Yes, it should be best to use the Arduino 5V and 3V3 supplies. But, is the 3V3 adequate (ie current) to supply the 3V3 circuits including the P1?

    Well, the 3V3 supply to the breadboard is only for the level shifters. The C3 (with the P1) has it's own power supply from the host PC.
    Cluso99 wrote: »
    Another point. When using breadboards, sprinkle some 100nF bypass caps around the rails, and a couple of 1uF tantalums would not go astray either, although currently you don't have anything on these breadboards. These all make for a quieter supply and less likely to suffer from brownouts.

    Ah, you know what...I always do this but apparently I wasn't thinking. I don't have any bypass caps on that board. I guess because I wasn't powering anything other than the level converter. However, if you look closely, you will see that NOTHING is powered on the breadboard at the moment. The level converter and IC aren't connected yet. It's only connected via GND. But I will add some caps anyway and see if that helps.


    Thanks everyone!
  • cbmeekscbmeeks Posts: 634
    edited 2020-07-17 13:18
    OK, I think I might know what's going on.

    I removed the GND connection from the C3 so that the C3 and Arduino are completely isolated. Same thing. I unplug one and the other reboots.

    So I think it must be my host PC or something. Both dev boards are seen as USB/COM ports so I'm not sure why unplugging one would affect the other unless there is some kind of power draw on the USB ports. Even plugging in my PropPlug will reboot the C3 or Arduino.
  • That is strange indeed.
    How are you connecting the USB ports:
    - To two ports of a hub?
    - To two ports on the same controller/roothub?
    - To two ports on different controllers? (My PC has 3 destinct USB controllers for USB 3.1, USB 3.0 and USB 2.0)
    - Anything else plugged into the same hub/roothub/controller?

    I know that putting a Propeller board on an unpowered hub with anything else will result in the hub's power occasionally getting momentarily cut due to the Propeller operating at or over the limit of what you're supposed to be allowed to draw from a USB port. Maybe unplugging one causes a glitch in the current monitoring? Check if the power is going out!

    Maybe it's also a software thing? Can you check wether the flow control toggles on the C3's FTDI? (that might be a bit difficult to probe though, SMD parts and all...)
  • that is pretty simple,

    When you plug or unplug a USB device you BUS gets re-enumerated DTR/RTS toggled and - voila - reset.

    The only way to solve this is to cut the trace between FTDI and reset somewhere and put a jumper there for programming and remove for use.

    The only board where Parallax did this was the Spinerette Webserver Version.

    Enjoy!

    Mike
  • Ah! That makes sense. Especially since I've seen the COM port numbers change before even when plugged into the same port.

    Thanks for the explanation.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-07-18 00:08
    I used to design and program so many 6502 and 65816 (and M37702) systems and I still have fond memories of working with them. What I would like to see is the 65C02 as the core micro in these itty-bitty micros, but no, they are either PIC, 8051 or ARM M0 mostly. The original Rockwell R6511AQ that I worked with had bit instructions which filled in the instruction set nicely for both memory and I/O whereas the PIC and 8051 are great for I/O but lousy for memory, and the M0 great for memory but lousy IMO for I/O.

    BTW, I still have stacks of various 6502 based boards and modules I used to use in products and recently I updated a 65C02/6511 simulator written in TAQOZ.

    VGA
    As for a video solution for the 65C02 how about a serial connection to the video P1? I made P1 boards in the past that would fit into a VGA headshell that would plug directly into the monitor. These actually had RS422/485 drivers so that I could either drive them from a single serial I/O without drivers, or RS232 as I had resistors in there to bias and current limit, or full-duplex RS422. However I would just use RS485 half-duplex and the video P1 was setup as a 4 color bitmap taking up most of the 32k RAM but had routines for scalable text and graphics (or maybe it was a tiled driver). It even had a USB A socket for a keypad in PS/2 mode for operator input. I could distribute these around a factory off the one multidrop 4-core phone cable that carried 24V and RS485.

    Now, if you just used the code on whichever P1 you had, wouldn't that do what you want? You can run at 2Mbd easily but you really only need a single I/O from your 65C02 system so this frees up tons of I/O or interface chips. Personally, having programmed 65C02 systems I would just bit-bash serially as fast as I can so the host is not waiting too long to send a character. Forget about buffering transmit, it's actually faster to bit-bash it serially at high-speed.

  • I used to design and program so many 6502 and 65816 (and M37702) systems and I still have fond memories of working with them. What I would like to see is the 65C02 as the core micro in these itty-bitty micros, but no, they are either PIC, 8051 or ARM M0 mostly. The original Rockwell R6511AQ that I worked with had bit instructions which filled in the instruction set nicely for both memory and I/O whereas the PIC and 8051 are great for I/O but lousy for memory, and the M0 great for memory but lousy IMO for I/O.

    BTW, I still have stacks of various 6502 based boards and modules I used to use in products and recently I updated a 65C02/6511 simulator written in TAQOZ.

    VGA
    As for a video solution for the 65C02 how about a serial connection to the video P1? I made P1 boards in the past that would fit into a VGA headshell that would plug directly into the monitor. These actually had RS422/485 drivers so that I could either drive them from a single serial I/O without drivers, or RS232 as I had resistors in there to bias and current limit, or full-duplex RS422. However I would just use RS485 half-duplex and the video P1 was setup as a 4 color bitmap taking up most of the 32k RAM but had routines for scalable text and graphics (or maybe it was a tiled driver). It even had a USB A socket for a keypad in PS/2 mode for operator input. I could distribute these around a factory off the one multidrop 4-core phone cable that carried 24V and RS485.

    Now, if you just used the code on whichever P1 you had, wouldn't that do what you want? You can run at 2Mbd easily but you really only need a single I/O from your 65C02 system so this frees up tons of I/O or interface chips. Personally, having programmed 65C02 systems I would just bit-bash serially as fast as I can so the host is not waiting too long to send a character. Forget about buffering transmit, it's actually faster to bit-bash it serially at high-speed.

    Peter, as it happens I am self-taught on 6502 assembler, and even BASIC on the Apple. And any time you'd like to send any of those boards here, I've got space.

    It also happens that's why I asked about that system, it looked extremely familiar to me.
  • 6502 isn't unheard of today in small embedded systems. I seem to recall a Hackaday article about a keychain picture frame thing that was powered by one. But 8051 is probably popular because the core includes the very useful counter/timers. I suspect Chip had those in mind when he put them on steroids and gave the P1 eight banks of them.
  • I agree. I saw the same article as well.
    There's a whole website out there dedicated to keeping that idea alive in fact.
  • The 65C02 as a CPU is not much use, but the core is very small and if they used that as the core in say the $1 EFM8UB3 micro that I am using for USB serial, then I'd choose it over the 8051 any day of the week. No such thing though.

    Here's a die shot of a chip from 2004 that used a 6502 core.
    957 x 930 - 276K
Sign In or Register to comment.