A trick I have heard of is running a circuit to mimic the crystal and have it run at a very slow rate I don't have a schematic handy but I know there is a few techie show off on the list that will gladly produce one :-> ----- Original Message ----- From: "Thomas McGahee" To: Sent: Thursday, March 28, 2002 4:57 PM Subject: [PIC]: Simple debuggung techniques > For doing testing on PIC circuits that are under development, I often > send out a little data stream on any available i/o line. > > First I send out a pulse that goes high for some relatively short time. > This pulse is used simply to initially trigger the scope. I then > send out a low for a time equal to the trigger pulse. Then I begin > sending out 8 data bits (I usually make the data bits 1 ms wide, > simply because I almost always have a 1 ms timer routine in all my > programs. But make it whatever width you find convenient.) > I then ensure that after the eighth data bit I send out a low for enough > time to allow the scope trace to disappear from the screen, ready for the > next trigger. I then do this over and over again at regular intervals. > When done often enough, the scope display will appear stationary > and it is very easy to determine the value of each bit. > > I adjust my scope so that each data bit occupies one major grid unit. > I can now read off any binary value from 0 to 255. > > You are not limited to 8 bit values. I routinely display 16 bit and even > 24 bit values this way. > > For those who don't own a scope, you can use a shift register or > set of shift registers to cause the binary values to be displayed > on LEDs. When doing this, I use different colors for each group > of 8 data bits. In a pinch you can get by with just a clock and a > data line. This means you have to tie the other shift register > control lines to a high or low, and you will get flicker as the data > is clocked through, but if you clock fast and then display for a much > longer period, the result is not too bad. > > Remember, this is just a test aid. It is often useful to have such test > aids built on little PC boards or perf boards, with color coded hook > leads attached so you can attach to +5, Gnd, a Clock and a Data line. > > Anyone else have any little debugging/testing aids they would like to > share? > > One of the most versatile aids I use is an LCD module that I have hooked > up to a proto board that has a PIC on it programmed to accept input at > 4800 baud normal or inverted (jumper selectable). It also has a > two wire serial interface consisting of a Clock and Data line for those > times > when I don't have a uart or uart routine on the host. The same board > also has a 4800 baud output in both normal and inverted form that sends > out a simple test message. A dip switch can also select an echo mode > so it sends out whatever byte it last received. > > The data received can be displayed as ASCII text, or it can be formatted > as either hex or binary, or interpreted as 8/16/24/or 32 bitnumerical data > and > displayed in base ten. The on board RAM forms a circular buffer and > you can review the last 64 data items. A start/stop switch allows you > to control whether or not new input is placed in the circular buffer. > A set of analog inputs allows you to measure several ground referenced > voltages, including the +5 of the circuit it is attached to. > > A 4x4 keypad is used to menu select what is displayed and what functions > are in effect. I am always looking for ways to improve this tool. It > makes for a wonderful PIC project. One of these days I will make a PC > board for it... if I ever stop adding features! > > Fr. Thomas McGahee > > > ----- Original Message ----- > From: "M. Adam Davis" > To: > Sent: Thursday, March 28, 2002 3:52 PM > Subject: Re: [PIC]: Simplest, cheapest, easiest solution for displaying 2 > numbers. > > > > The cheapest visual solution is one very cheap LED. Like the old engine > > indicators: > > > > Blink the number of times for the first digit (1/4 second on, 3/4 second > > off) > > Pause for 2 seconds > > Blink the number of times for the second digit (1/4 second on, 3/4 > > second off) > > Pause for 5 seconds > > > > Takes 25 seconds max to read the two digits off the display, but costs > > less than a few cents, and only needs one line. > > > > I bet there's even a way to do it with zero dedicated lines. > > > > -Adam > > > > Drew Vassallo wrote: > > > > > I want to display just 2 numbers out of the PIC somehow. Doesn't matter > > > how, just the simplest, easiest, cheapest solution. Could be an LED > > > display, LCD, smoke signals, it doesn't matter. > > > > > > I'd like to use a 12C67x series 8-pin PIC, though, so I only have 3 > > > lines to > > > use maximum. If it's not possible in this case, I would have to move > > > to a > > > larger chip, but it's not preferred to do this. > > > > > > I have a 2-wire LCD interface already working, but I'd like to make it > > > simpler/cheaper if possible. > > > > > > Any suggestions? > > > > > > --Andrew > > > > > > _________________________________________________________________ > > > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > > > > -- > > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > > > > > > > > > > > > > > > > -- > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu