Electronics Bench in a Box
Tony Nixon posted [to the PICList] that
he was able to write a boot loader for the '877 including a PC program to
write code out to the PIC which would
then write it to FLASH and run it. It dawned on me that a '877 preprogrammed
with this boot loader was a 5ドル development environment when combined with
the free MPLAB software and
a few bench tools (power supply, DVM, signal
generator, function generator, frequency counter, scope, logic probe or analyser,
etc...) Then I started thinking that all these things have been implemented
(at least in basic form) in PIC's. And
the support electronics for a DVM and scope are very simular, as are the
(variable) power supply and signal generator and the code for the function
generator, frequency counter and scope all involve rapidly copying port values
to or from ram, so....
The upshot is that I think a 10ドル board consisting of a '877,
MAX 232, Analog front end,
PWM output filters and
power
regulators could provide the following:
-
Boot loader (see boot loader)(see boot loader)
-
A port / register monitor
-
Ralph Stickley had already implemented a program to monitor register values
over an available hardware serial port. His PC software polls the PIC with
register numbers and receives a response via an ISR that consists of the
current value of that register. You can get it at:
http://www.piclist.com/stickleyregmon
-
[note that] one of the registers is the program counter and others are the
ports, so....
-
RS232 debugger / monitor?
-
if the PC software has a copy of the source code and hex file and the register
monitor can see what the PC is pointing to....
-
I was wondering if the ISR could be setup to allow only one instruction of
the main code to execute when the ISR returns. When the ISR regains the processor
after that instruction, it could read the registers (one of them is the saved
program counter, right? or wrong? I haven't worked with this, maybe it can't
be read) report that to the PC which could then match the PC value against
the code listing and display the listing with that line highlighted along
with the other register values, port pin states, etc.. and buttons for single
step, reset, etc..
The ISR would loop checking the RS232 port and could also be capturing port
pin signals, a2d results, etc.. and sending them to the PC which could display
them on the screen in virtual logical analyzers, o'scopes etc...
When the user presses the single step button, the single step command is
sent by the PC to PIC and the ISR returns for one more main code instruction.
If the user selected the Run button the ISR could still interrupt the main
code every so many cycles and report to the PC the registers, ports, a2d
etc... This would introduce a heck of a jitter in the main program but it
would be better than not having it at all.
If the user selected a register in the PC display the GUI would allow editing
and then send a request to the PIC ISR which would update the register and
continue looping.
-
Tony Nixon posted a start at
http://www.infosite.com/%7Ejkeyzer/piclist/2000/Feb/1618.html
-
http://propic2.com/ is an ICD clone from
Brazil
-
http://www.infosite.com/~jkeyzer/piclist/2000/Feb/index.html#1618
-
Scott Dattalo says the 18cxxx chips will have all the features necessary
for a free ICD debugger see:
http://www.infosite.com/~jkeyzer/piclist/2000/Feb/1718.html
http://www.infosite.com/~jkeyzer/piclist/2000/Feb/1725.html
http://www.infosite.com/~jkeyzer/piclist/2000/Feb/1858.html
-
Its been done! Closed source though. See:
www.epemag.wimborne.co.uk/0300.htm
http://www.epemag.wimborne.co.uk/0300.htm
http://www2.iversoft.com/piclist/ViewMsg.php3?MsgID=200003091355.NAA24156@sp3at21.hursley.ibm.com
http://www.infosite.com/%7Ejkeyzer/piclist/2000/Mar/0762.html
-
Triggered high speed copy of pins to RAM with RS232 control / reporting for
a super simple logic analyzer (2.5MHz max ~300x8 samples or 1Mhz and ~2400x1
samples per trigger)?
-
Dan Michaels of
http://www.oricomtech.com has done
this I hope code will be forthcomming.
-
http://www.infosite.com/%7Ejkeyzer/piclist/2000/Feb/1414.html
Tom Handley designed a simple 24-Bit Trigger Comparator as part of a Logic
Analyzer block that may be of use in a hight end version.
-
David Harris points out that AN689 on Microchip site describes an "Engineer's
Assistant." Basically a logic probe + 1 bit analyzer + ASCII decoder
+ frequency counter with battery recharge circuitry (16F84+LCD). The logic
analyzer acquisition software is a wonder to behold.
-
A/D support for pic o'scope (20uS per sample gives
0-25kHz, ~300x8 to ~600x4 samples ) with display on PC via RS232?
-
Audio Spectrum
Analyzer fft/picspect.htm
A PIC based Video display and Spectrum Analyzer
-
DVM (0 to 5v, 10bits = ~3 digits single channel via A/D or multiple channel
at lower res. via PWM capture with simple external hardware) display on PC
via RS232?
-
Function generator based on copy of RAM to port pins (2.5Mhz max ~170x8 or
~1Mhz and ~2400x1 steps) under PC control via RS232?
-
Signal generator via PWM (?Hz low useful frequency ~300 waveform steps with
simple external hardware RC) under PC control via RS232?
-
Regulated variable power supply with intelligent current limiting.
-
Device programmer (CUMP mode)
-
Given the ability to generate variable (high) voltages and the ability to
control the pins, the device could be connected to other uC and memorys to
program them. In this programming mode, the main PIC would regulate the high
voltage power and stimulate the target PIC according to a programming procedure
developed for the target device.
-
Maybe a ZIF or low cost socket on the main PIC's PCB. Maybe an optional daughter
board that routes the main PIC pins and high voltage signals to the correct
pins for the target using the main PCB socket or with a socket on the daughter
board for other types of packages. Each low cost daughter card could (not
must) have the target device ID and/or programming instructions for the main
PIC in a serial EEPROM. Daughter cards could have stacking connectors to
allow other cards to be connected at the same time.
-
http://www.piclist.com/cump
the CUMP project
See also:
-
http://members.cox.net/berniekm/super.html
16 functions with very few parts+
-
http://www.bubblesoftonline.com
-
http://www.htsoft.com
-
http://www.piclist.com/projects.htm
-
http://www.geocities.com/CapeCanaveral/Lab/9595/
-
http://www.oricomtech.com/ is
THE multi-function version. IR, Logic Analyzer (20Mhz), o'scope (400K, 5MHz
repetitive), Glitch mode, Serial Protocals (to 5Mhz), Function Generator
(5Msps, 50 nsec pulse), Signal Generator (Arbitrary Wave or Multi-Pulse),
Delayed Triggering (1 - 1000 usec), Pulse count (120 Mhz) 199ドル limited time!
-
http://www.oricomtech.com/projects.htm
New lower cost version of the hardware
-
http://www.bitscope.com/ is
THE top end version. Dual channel 100 Mhz Digital Sampling Oscilloscope and
8 channel Logic Analyzer. Really clean user interface software. The entire
design is open and available for download free of charge. Board level kit
is 250ドル. Main chips and PCB for 70ドル.
-
http://204.210.50.240/techref/default.asp?url=tools.htm
Anyway, you could develop right on the CUMP and then port it to a (smaller,
cheaper) target processor which you program, stimulate and test via the CUMP
after the code is basically running. See
http://www.adv-transdata.com/User_Guide/DS91033.pdf
(cached 20000229114401)
Optional extensions are without limit. Starting from a low cost, easy base,
the unit could be cheaply extended to add external high speed RAM signal
capture and generation, high impedance analog front ends and back ends, user
interfaces to replace the PC GUI. If the daughter card interface is done
correctly, these additions would be as easy as plugging in a new card with
the code for the main processor to use it right on the daughter cards own
EEPROM.
An external, high speed (hundreds of MHz) oscillator with a high speed counter
(maybe the timers in the SX48/52) might be capable of adding TDR capability.
Most 50 ohm coaxial cable has a V factor of .66, and the pulse goes out and
comes back, so figure .33C as a starting point. At 300 MHz, a wavelength
in free space is 1M, so to get accuracy to the nearest meter, you'd have
to count at 600*.33 or 200 MHz. Other cables are different, basically the
higher the Z, the higher the C.
Build a 110VAC to 1V switcher, use 'flat-transformer' technology for 98%
or better efficiency. With this type transformer, there is almost zero leakage
inductance, so almost no losses from snubbers, etc. in the primary. Flat
transformers don't even need square 50/50 duty cycle...you can regulate by
varying the on time of the input voltage switches. They have a limitation
of fifteen volts, but yield an easy way to build a 300kHz to 1 MHz switcher.
On the secondary, be sure to use Power Mosfets as synchronous rectifiers,
so that ON resistance is perhaps .05 Ohms when they conduct and diode losses
are virtually non-existent. In other words, you drive the Mosfets on only
when the diode they replace is supposed to conduct. Terrific efficiency.
Output voltage or current is easy to control depending on the feedback circuit
used. We are talking 98% efficiency here with 1.0 volts out, scalable to
almost any power level.
Dan Michaels says:
I've done a number of the things you mention using 20Mhz PIC16C73/74/76 chips.
They make rather nice simple 1-chip scope/logic_analyzer/generator instruments
- albeit a little slow.
The best "logic analyzer" rate is 2.5Mhz using a 20Mhz part. 1 instr to capture,
1 to store, using linear code and direct addressing. You can't fill more
than about 96+80=176 locations without bank-fiddling, which adds some skew.
The best rate I could coax out of 1-bit sampling, which of course requires
time to pack 8-bits to a byte, was 1 Mhz.
If you can actually get 20Mhz and 5 Mhz datacq, as mentioned in your e-mail,
please tell me how.
Also, regarding "signal generator via PWM", this works extremely well on
the 2nd gen PICs with the built-in PWM generator. Turns out all period values
and duty-cycles are available on these chips, so you are not limited to just
a few PWM rates (as on most microcontrollers??), and you can actually get
continuous pulse widths and reprates from 50ns @ 5Mhz, down to about 800us
@ 1.2Khz. Since, it's done in h.w., there is no s.w. overhead or timing loop
problems.
A while back, I wrote an Appnote about this, which spells it out in detail:
"AN-ECD06 - Precision 50-nsec Pulse Generation Using a PIC16C63" available
at:
http://www.oricomtech.com/appnotes.htm
- Dan Michaels
Oricom Technologies
Power@
See also:
Questions:
-
-
+
-
Daniel Imfeld asks: "
All the links to www.infosite.com are gone. Does anyone know if these pages have been mirrored elsewhere?"
James Newton replies: http://web.archive.org/*/http://www.infosite.com
But the web archive is not accessible from that. Use the PICList.com archive instead. Translating the one to the other should be pure hell. I * think * the number at the end of the link is the counted number of the post since the beginning of the month. The month view in the PICList.com archive might help you get near the right point....
If you were willing to help fix up the links, I could modify the archive browser to show a cumulative count for each day from the first of the month as well as the count per day.
++
-
~NOSPAM~TEAMproject01~NOSPAM~ at SPAMhotmail.com asks: "
hi, has anyone done a project using the pic16F877 for a universal remote control."
+
Interested:
Comments:
-
dead link: bubblesoftonline is now a domain squatter.+
file: /Techref/idea/ebb.htm,
22KB, , updated: 2007年1月22日 09:57, local time: 2025年9月1日 18:11,
©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Questions?<A HREF="http://techref.massmind.org/techref/idea/ebb.htm"> Electronics Bench in a Box</A>
Did you find what you needed?
Welcome to massmind.org!
Welcome to techref.massmind.org!
.