Harold, can I send you an offlist email with a couple of questions? Thanks, Josh Harold M Hallikainen wrote: > > Josh, > > I've used the 16f628's in another project (see > http://www.denmat.com/solsheet/virtuoso/info_phase2.htm). In that > project, we actually used two 16f628's and a 16c716. The remote handle > has a 628 driving 2 seven segment displays (multiplexed). It also reads > two push-button switches. The data is put onto one "data" wire (carrying > data both directions using simple packets) to the timer board. The timer > uses another 16f628. The timer and the handle communicate using the UARTs > in the 628s. The timer scans the keyboard, drives the display, and tries > to figure out what the user wants to do. Some of the modes are user > configurable, so that uses the EEPROM in the timer's 628. One of the > timers in the 628 is used as a frequency counter to watch a light to > frequency converter chip. That is then scaled by a scaling factor in > eeprom to drive the display to show mw/cm^2 of light to check the system. > Finally, the timer board outputs a PWM signal that drives the power > supply board. The power supply has the 716. The PWM is low pass filtered > to DC and then read by an A/D on the 716. The A/D also reads full wave > rectified AC on the isolated secondary of a transformer. It reads about > 200 samples per half cycle of AC. From this it calculates the RMS voltage > driving the lamp and adjusts the firing angle on a triac to make the lamp > voltage proportional to the LPF'd PWM. This lets us regulate the lamp > voltage and control it with the PWM from the timer board. > So that's what I've done so far with the 628. It IS a nice chip! > This week (at LDI), we're introducing the IQ512. It uses the 18c452. The > 452 IS nice in that it has lots of ROM and RAM space. In the IQ512, we > hold two DMX transmit frames (each 512 bytes). We are transmitting one > while "building" the other, considering input pots, crossfaders, and > patches. Once the frame is "built", we toggle one bit and the DMX > transmit routine switches over (generally mid frame) to transmitting the > frame we just built. The mainline code then goes and starts building > another frame in the buffer we just stopped transmitting from. > The 18c252 is also very nice. Same RAM and ROM, but less I/O, making the > chip smaller. This was used in the BrailleMaster > (http://www.dovesystems.com/BuildPage.php3?page=braille). The ROM lets us > put in a 400 word dictionary and still have lots of space left. The > dictionary size was limited by the speech chip (ISD4004-08). > All the Dove Systems DMX products (http://www.dovesystems.com) use PICs. > They all use the UART instead of bit banging DMX. Both transmit and > receive are interrupt routines that call state machines. On some products > I generate the break by disabling the serial port (but that disables the > receiver too!). On others I generate the break using a separate pin on > the PIC. The TX output goes through a resistor to the "break pin", then > on the the MAX488, which we use to drive the DMX line. The break pin is > usually tristated. When I want to send a break, I make it a low output. > When done, set the tris bit again. > I've found it a pain to try to sync up break and transmit characters if > you are using the transmit interrupt. So, instead, I use a timer > interrupt to generate an interrupt every 50us. By loading the UART every > 50us, you are guaranteed that the byte you dump into the txreg will be > sent immediately. When you come back in 50us, you know it has been > completely sent and you can start the break. Come back in 50 us (or > more), and end the break. Works well. > I'm using the MPLAB ICE to do development for the 18c452 and PICMASTER > for the 16c74. Everything else I have to use crash and burn (try to > figure out why it crashed by staring at the code or simulating, then burn > another chip). The flash chips are nice, but, for development, I always > have several EPROM based chips sitting in the eraser. I just pull one as > I need it and move my crashed chip to the back of the eraser. The flash > chips ARE especially nice when we discover a bug (luckily very rare) in a > product that's on the shelf. Instead of throwing away a few hundred OTPs, > we can reprogram the flashes. We just moved from the 16c74b over to the > 16f74. Less cost and less trash! > The 18c is very nice. In general, I've been able to just move code over > and have it work. Watch out for some subtle differences, though. Over the > weekend I found that incf and decf on the 18c affect more flags than on > the 16c. This caused some interesting problems on some math routines I > got from a library at piclist.org. > The "access bank" on the 18c seems a little confusing at first, but the > assembler really takes care of it. It's nice to not have to do bank > switching. I put all my directly addressed variables starting at address > 0, and they all end up in the access bank so I don't need to deal with > bank selecting. Indirectly addressed variables (like DMX buffers) are > above that. Since they are always accessed by an FSR (and there are three > of them!!!), and the FSRs are 16 bits long, you STILL don't have to deal > with banks. Also, autoincrement and autodecrement are handy. So is movff > . > Nice chip! All I need now is pushw and pullw (or popw) and maybe push > and pull status. > > Have fun! > > Harold > > On Fri, 26 Oct 2001 16:34:51 -0400 Josh Koffman > writes: > > Hi Harold. Have you looked at the 16f628s yet? I think they could be > > an > > idea chip to use in small dimmers and relays boxes. Cheap, built in > > UART, and small. I know you can't show me any code from your Dove > > products, but can you show me any flowcharts or anything? So far all > > I've been able to see is Kelly's code. BTW, how is it using the 18x > > series? I'd love to start playing with them eventually, but I'm more > > than a little intimidated. The main reason I want to use them is > > that > > with more memory, I'd be able to store an entire DMX frame at once. > > And > > now that there are flash versions, I can save money over a windowed > > part. Also are they available with 2 UARTs? That would make > > interfacing > > with a PC a lot easier. Does the Starport use a PIC? If so, are you > > bit > > banging one of the ports? Anyway, I'd really appreciate any help you > > can > > give. > > > > Thanks, > > > > Josh Koffman > > FCC Rules Online at http://hallikainen.com/FccRules > Lighting control for theatre and television at http://www.dovesystems.com > > ________________________________________________________________ > GET INTERNET ACCESS FROM JUNO! > Juno offers FREE or PREMIUM Internet access for less! > Join Juno today! For your FREE software, visit: > http://dl.www.juno.com/get/web/. > > -- > 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: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.