Keyboard Shortcuts
Likes
- Z80MC
- Messages
Search
Re: Strange behavior of #8 button
Kerem Kapkin wrote: > Here is the recommended setup for standalone testing of the front panel... > J2 Pin 9 [/out] connected to 3 components. 0.1uF cap other end ground, > momentary switch other end ground, > 100K resistor other end Vcc(5V). ? Correct. This provides a debounced pushbutton to clock counter U2A. ? > J2 Pin 24 -CLOCK- high (Vcc) or low (Ground) ? Either is fine; you just don't want to leave a CMOS input floating. ? > P1 pin 1 ground to (-) power supply ? Or J2 pin 10 also works. ? > J2 Pin 19 Vcc to +5V power supply ? With this setup, you can step counter U2A through its states 0-7. Each state is output on J2 pins 11, 12, and 13. Each state should set the corresponding output of U3 low so you can test each button. ? I think I see the problem with the "8" key! When U3 output C0 is low, IN4 (J2 pin 15) should be high. But transistor Q3 is also connected to C0. It is a "pre-biased" FJN3305, which has internal 10k and 4.7k resistors between its base and emitter. Its emitter ties to C0, and its base to R1D, a 1.5K to ground.These three resistors (10K + 4.7K + 1.5K = 16.2K) are pulling C0 low despite 18K R4A trying to pull it high! Thus the "halfway between" logic level, on IN4. ? I'm busy preparing for VCF-East right now, but will confirm this when I return. In the meantime, I'll bet putting a lower value resistor (like 1.5K) in parallel between R4A pins 1-2 will fix the problem. Lee -- Excellence does not require perfection. -- Henry James But it *does* require attention to detail! -- Lee Hart -- Lee A. Hart |
Re: Strange behavior of #8 button
Here is the recommended setup for standalone testing of the front panel, just to make sure it is the correct start. -J2 Pin 9 [/out] is connected to 3 components. 0.1uF cap other end ground, momentary switch other end ground, 100K resistor other end Vcc(5V). Original recommendation was to use J2 Pin 8, however (b)TTL option that pin is not connected to anything but P1 TX 5. -J2 Pin 24 -CLOCK- high (Vcc) or low (Ground) -P1 1 ground to (-) power supply -J2 P19 Vcc to +5V power supply On Fri, Mar 28, 2025 at 5:01?PM Lee Hart via <leeahart=[email protected]> wrote:
|
Re: Strange behavior of #8 button
Nothing is actually getting hot on mine. Barely perceptible warmth would be a better way to put it.
I'm powering it directly from the USB port on my laptop. Actually I just got a new laptop and it's doing the same thing as it was with my old one. Just tried connecting it to a USB charging port that supplies 2.5A. The USB cable is fairly substantial. It's not the kind with thin crappy wires. I know what you mean about those. That had no effect on the problem. I did a little more troubleshooting. The only test equipment I have available here is a multimeter. VCC measures 4.7v. Looking at the 74LS145, I went from Gnd to pin 1 which is C0(SW8) on the schematic. When I press the 8 button, it only pulls up to 2.2V. All the other buttons pull up to about 4v. Mitch |
Re: Strange behavior of #8 button
> I cannot get S8 work no matter what. While running FFF1 sequence it is using 92mA current at 5V supply. ? OK, that's correct. You have enough 5v power. ? > While testing with the logic probe, 74LS145 inputs to A(15), B(14) and C(13) are fine but D(12) is always LOW. ? That's also correct. 74LS145 input D (pin 12) is always low when the interrupt handler is working. The inputs to it count from 0-7 and repeat. If the Z80 interrupt handler fails to respond to the keyboard/display interrupt, then input D (pin 12) goes high to disable the LED display and keypad. ? As I described earlier, you can test the Front Panel by itself, without the CPU board. You should be able to set the A B C inputs of the 74LS145 (with the 74HC393 counter) to each of the 8 states, then operate each keypad key in turn, and see the IN bits identify which key you pressed. ? Lee ? I am using the (b) TTL configuration both on the Z80 card as well as the Front panel. -- Excellence does not require perfection. -- Henry James But it *does* require attention to detail! -- Lee Hart -- Lee A. Hart |
Re: Strange behavior of #8 button
I cannot get S8 work no matter what. While running FFF1 sequence it is using 92mA current at 5V supply.? While testing with the logic probe, 74LS145 inputs to A(15), B(14) and C(13) are fine but D(12) is always LOW. I am using the (b) TTL configuration both on the Z80 card as well as the Front panel. On Fri, Mar 28, 2025 at 4:04?PM Lee Hart via <leeahart=[email protected]> wrote: Ah; that may be a hint. The Z80MC runs *cold". Everything is CMOS, nothing gets hot. |
Re: Strange behavior of #8 button
Ah; that may be a hint. The Z80MC runs *cold". Everything is CMOS, nothing gets hot.
What are you using for a power supply? Could its voltage be insufficient? USB supplies are often weak, and the cables so thin that they have lots of voltage drop. I haven't seen this problem with the Z80MC (which draws less than 100mA), but it often happens with the Altaid 8800 (which draws close to 500mA). Lee -- Excellence does not require perfection. -- Henry James But it *does* require attention to detail! -- Lee Hart -- Lee A. Hart |
Re: Strange behavior of #8 button
I thought that there was a pattern to the failure I'm experiencing but now I'm not so sure.
One thing I did notice, when the chips are cold, it seems to work. Once it warms up, the problems occur again. When I get home next week, I may try adding a parallel resistor as suggested. Mitch |
Re: Micro BASIC Manual
I also have an issue with the 8 not working, but i chalked it up to me messing up the build. I will try to see if I can find time to test out your theory this weekend.
toggle quoted message
Show quoted text
-=- Brett Sent from Proton Mail Android -------- Original Message --------
On 3/28/25 12:46 PM, Lee Hart via groups.io - leeahart=earthlink.net at groups.io <leeahart_earthlink_net_at_groups_io_wswmxnaql@...> wrote: You're the second person to mention problems with the "8" key. I haven't seen it myself, and from the schematic, can't imagine what could be wrong that only affects the "8" and not the other keys in the same row. |
Re: Micro BASIC Manual
Hi Lee,? I will try your suggestion. I have the front panel on my breadboard now with your suggestions for testing. Have a safe trip, when you are back we can reconnect for troubleshooting. Thanks, Kerem On Fri, Mar 28, 2025 at 9:46?AM Lee Hart via <leeahart=[email protected]> wrote: You're the second person to mention problems with the "8" key. I haven't seen it myself, and from the schematic, can't imagine what could be wrong that only affects the "8" and not the other keys in the same row. |
Re: Micro BASIC Manual
You're the second person to mention problems with the "8" key. I haven't seen it myself, and from the schematic, can't imagine what could be wrong that only affects the "8" and not the other keys in the same row.
toggle quoted message
Show quoted text
The only thing that's changed recently is that the 15Kx4 SIP was changed to 18Kx4 (because the 15K was out of stock). It works the same on my Z80MC, but maybe some 74LS145's have excessive off-state leakage that 18k won't pull up? An easy test would be to try adding a resistor in parallel with the 18K (like 22K) to see if that helps? Lee -- Excellence does not require perfection. -- Henry James But it *does* require attention to detail! -- Lee Hart -- Lee A. Hart -----Original Message-----
From: <[email protected]> Sent: Mar 23, 2025 8:11 PM To: <[email protected]> Subject: Re: [Z80MC] Micro BASIC Manual It's funny you mention a problem with the #8 button. I have a similar problem with mine. Instead of getting 8, I get 9. Spent a bunch of hours troubleshooting. Never figured it out. Sometimes it will produce an 8. If I do E 2888, I get 2899. If I do E 7888, I get 7899. And so on. Maybe we should start a new thread... Mitch |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
For native CP/M I have a shopping list of compliers to
compare to.? For raw code development speed and
ease BDS-C is my goto.? For editors I have VEDIT and as
screen oriented editor its very good with real terminals
(most PC terminal emulators fail hard for keyboards
that do not? match real terminals).
?
Haven't played with Z88DK, just no reason to have a SmallC
on pc when I have it on native Z80.? So I skipped it.? Actually
I have two versions one for 8080/8085 and the Z80 with
peephole optization and matching libraries for both.
?
Generally C is nice with complex data structures and
other projects where some level of portability is nice.
However C on z80 has a tendancy to eat ram.
?
I can think in 8085/z80, habit and years of doing it.? ?
That and I have a nearly 5 decades of code including
a macro library for both that is optimized.? Both take
advantage of undocumented instructions that are
different for 8085 and z80.? The 10 "hidden"
instructions that all 8085 have and actually can
improve code.? For Z80 there are special cases
where the undocumented by Zilog but documented
by everyone else that makes z80s do help code
size and speed.
?
That is the difference between CP/M systems which
have resources memory, io, and storage.? Also CP/M
had basic tools supplied so it had a useful starting point.
That and I've had hard disks on CP/M since mid 1980
so the archive is larger never mind the WC-CDROM
for shear volume.??
?
On one of my Kaypros has Handyman a secondary rom
that piggybacked the z80 and added handy stuff like a
calculator, note pad editor, and calendar plus other items.
IT also operated independant of CP/M and could copy
results to CP/m applications.
?
Years back I used a flavor of Tiny basic married to the CCP
to make a scripting command line.? I was spoiled by
VAX/VMS DCL (Digital Command Line) which was a
interpreted language in itself? with explicit and implied
scripts and very powerfull.? ?This is back early 80s where
I was trying to get big iron features on a Z80 CP/M machine
and largely succeeding.? Then again I had PDP-8 and PDP11
hardware and OSs to incite and inspire.
?
As a to a calc for CP/M most assumed VT52/vt100/vt220?
all having keypad.? Many other terminals did as well as
most emulated Vt100.
?
" I wish I had now what I was used to then."
?
Allison |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
Thanks for looking into it and sharing back! ?Your experience mirrors mine; I find the SDCC code generation to be a bit fluffy. SDCC is a labor of love of its authors, so I suspect that advancements in optimisations are catch-as-catch-come.
?
My reflection on this mini-project is that SDCC can be a project accelerator if you want to use modern C authoring on a desktop dev env and are not picky about code size. If you've got the flash/ram, might as well use it. My acid test was compiling an HP15C emulator within this toolchain. This resulted in a program that fit in the 32 KiB banked region and there was plenty of RAM for variables in the non-banked region. Could it be smaller? Doubles. Could it be faster? Surely. Did it take months to implement? No, because I already had the code on-hand, so I just had to concoct build scripts and implement main() to start the emulator.
?
(Incidentally I did not complete this PoC implementation because I realized much to my chagrin that calculators presume the presence of a button matrix, so... whoops! I did implement the screen rendering of the keyboard and LCD using VT100 codes. This was slow even at 115kbps. The stdio fprintf() layer was about half as fast as CP/M BIOS calls, but really still too slow even then to be pretty to look at. Since this was just a PoC for code size and execution speed, I didn't bother investing in completing key mapping, or thinking laterally, making a parser for a CLI version.)
?
I chasing other wild geese just now, though I still might come back to this as even just now a buddy is wanting to re-purpose some vintage z80-based spectroscope with alternative firmware. (Indeed, the genesis of this activity is because of some folks wanting to reverse-engineer an esoteric language CAI machine called the 'Cefucom'. I could glean a lot from disassembling the rom dump but eventually one has to buzz out the wires to know what PIO-A-bit-7 is electrically connected to, and whether port 20h selects U24 or U25. My suggestion was a custom firmware that tweaks the lines in a predictable way such that you can observe the chip select logic with a multimeter rather than reverse engineering all the intermediary SSI decode. So it was handy to be able to crank that out quickly irrespective of generated code quality.)
?
Thanks so much, Allison, for your insights and also your tales from the trenches of how things were. And are they materially different now? Or just more and faster? Well, I guess quantum computing seems different, or is that just the re-imagining of analog computers?
?
73, AG5TH, dave
|
Strange behavior of #8 button
I have the Z80MC with all 3 cards. Built this back in 2022.
It gets power from the USB cable when I connect it to my computer. Never tried to power it with a bench supply. When I press the #8 button, sometimes I get an 8 and sometimes a 9. Spent a bunch of hours troubleshooting. Never figured it out. I've been over every connection with a microscope. It seems to have a pattern but I don't know how to troubleshoot this. Examples: If I do E 2888, I get 2899. If I do E 7888, I get 7899. Now today, I powered it up and it's working perfectly. But I'm sure that's only because I'm writing this message. I've seen this behavior as well. It will work fine for a while. That tells me it's likely not a problem with the button itself. It would also tell me it's not a short somewhere. It functions perfectly when I connect with TeraTerm so it's not a huge deal and I just live with it. |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
My experience with SDCC is a bit dated but I know it got a LOT better with Z88DK. There's a lot of optimization work by a whole lot of people and solid C libraries that work out of the box.
?
At the time I was comparing it to my home brew compiler on the 1802 but i was quite impressed with SDCC/Z88DK. |
Re: Micro BASIC Manual
Mitch, Can you please tell me if you are using all 3 boards? or just the Front panel with the Z80? Also, how are you powering your Z80mc??? FYI, I'm using all 3 boards and powered from a 5V, 5A bench supply. Josh
On Sunday, March 23, 2025 at 09:11:04 p.m. EDT, Mitch Smith via groups.io <kb3gkc@...> wrote:
It's funny you mention a problem with the #8 button. I have a similar problem with mine. Instead of getting 8, I get 9. Spent a bunch of hours troubleshooting. Never figured it out. Sometimes it will produce an 8. If I do E 2888, I get 2899. If I do E 7888, I get 7899. And so on. Maybe we should start a new thread... Mitch |
Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....
When though full install of the SDCC on my main linux machine.
Reason was to find out in the flesh if it was batter than native...
?
The answer is, not really.? While its faster, the code pushed out
is not?better in any way on z80.? I expecteding the code is on a
PC based compiler?with lots of memory and processor available
it would be somewhat optimizing.? It does not.
?
While faster than running on 4mhz z80 over all between file
movement between PC and the real thing there was no gain.
Its fine if you live in the world of sims I'd expect.? ?It would
be handy for those building their first z80 or any of the
other supported machines and need "first code".
?
Useful experiment and new tools but better?? I can't say yes.
?
Allison |
Re: Micro BASIC Manual
What a strange problem.? Not happening on my system.? I tried 2888 and 7888 10 times and got the right number every time.
On Sunday, March 23, 2025 at 09:11:04 p.m. EDT, Mitch Smith via groups.io <kb3gkc@...> wrote:
It's funny you mention a problem with the #8 button. I have a similar problem with mine. Instead of getting 8, I get 9. Spent a bunch of hours troubleshooting. Never figured it out. Sometimes it will produce an 8. If I do E 2888, I get 2899. If I do E 7888, I get 7899. And so on. Maybe we should start a new thread... Mitch |