Alternate Piicaxe Programming Circuit

CDRIVE

Senior Member
If S1 is closed it will be shorting Download Serial In (C.5) to 0V so it won't see a break signal. I suspect that I am reading your earlier comment differently to how you actually mean - "Note that PinC.5 is held low when S1 is (closed) in Programming Mode. It stays low until Break is received".

I think you're confusing S1 with SW1. SW1 is an Axe090 push button switch. It's only used in when S1 is (open) in "Run Mode" to test that SerIn (PinC.5) successfully Disconnected and will run the main program without PinC.5 going nuts from being normally held high. S1 is a DIP switch that connects the collector of Q1 to the base of Q2. Since the Axe090 commits all three push button switches to +5V I had to add Q3 to invert the logic needed to replicate the bike horn's push button switch that brings PinC.5 low when closed.
No, because at that point you won't have issued a RECONNECT. As soon as C.5 is detected as high, the RECONNECT is executed but there is no reset because it is that edge case bug noted earlier. Put a RESET after RECONNECT and it will behave as expected as described earlier.
I'm not quite sure what you mean by "edge case". Are you saying the chip must see a (edge trigger) rising edge? As far as using the Reset command after the Reconnect ... That I do understand.

Thanks,
Chris
 

CDRIVE

Senior Member
If S1 is closed it will be shorting Download Serial In (C.5) to 0V so it won't see a break signal. I suspect that I am reading your earlier comment differently to how you actually mean - "Note that PinC.5 is held low when S1 is (closed) in Programming Mode. It stays low until Break is received".
After rereading your reply I suspect that I should have elaborated on my statement that you placed in quotes.

When S1 is closed (Program Mode) PinC.5 goes low and stays low because it's base is being forward biased by the collector of Q1 but goes high when when Q1's base goes high. The only reason I'm using two transistors is to maintain the serial logic of the PE6 download. A single transistor would have inverted it. S1 doesn't short PinC.5 low. It simply follows the serial input logic. If there's do data it will stay low. If there's data it will replicate it.


Cheers,
Chris
 

hippy

Technical Support
Staff member
Yes, I am probably confusing S1 and SW1, did think they were the same, and it is very difficult to understand exactly how things are at any particular point in time without seeing it or having it described accurately.

By "edge case" I was meaning "in a situation which is extreme, unusual or unexpected".

This is such a case with an active-low push button signal on Download Serial In and the input signal default varying depending on whether that push button is pushed or not, whether the programming interface is connected or not.

What it ultimately boils down to is merely a minor simulator issue; RECONNECT does not simulate a download/reset if that is executed with the Download Serial In pin high. That issue has been logged and should be rectified in due course. It can be worked round by adding a RESET after the RECONNECT.
 
Top