| QUOTE |
| I don't know of any prebuild cable but it's not too difficult to solder one or try to find someone who does it for you (maybe from the local hobby-radio (HAM?) club). 2,54mm Pin-Headers and plugs should be available from every electronic-(online)-shop. Look at the BF shematics: http://www.atmel.com/dyn/resources/prod_do...nts/doc4271.pdf Page 33. eg. J402(JTAG): Pin 4 VCC, Pin 2 GND or J400(PORTB)/J401(PORTD): Pin 10 VCC, Pin 9 GND or ISP-connector (maybe this picture gives a better overview: http://www.siwawi.arubi.uni-kl.de/avr_proj...ect_cabal.html) Solder or let someone solder a pin-header on the board and connect a stabelized supply or batteries to one of the VCC(+) and GND(-) pins. External voltage between 3,1 and 4,5V as mentioned in the manual. |
| QUOTE |
| Firstly when you type on your keyboard, it isnt echoed to the hyperterm screen by default. you also must hit enter when you are done. so if you dont think its working, it actually might be working |
| QUOTE |
| Yea, the non-echoing default for HT really had me going for a while. To echo typed characters locally go to file -> properties-> settings (tab) -> ASCII Setup... -> Echo typed characters locally (check box). I also had a pretty weak setup with unsound connections, so I soldered some nice header pins to my b-fly and made a nifty cable with a D shell connecter n' everything. As far as having to disconnect the battery to restart I guess just tapping back on the joystick will get you out of the uart loop (could have swore i tried that) it works everytime now. Oh, and last but not least... be sure to read the message on the b-fly, it was getting late and i think i just saw scrolling text on the LCD and assumed it was not what i wanted (i mean the thing can't work the first time right?). |
| QUOTE |
| The program itself has to be stored in Flash. Variables are stored in SRAM. EEPROM is used for values to be retained when power is turned off. External Dataflash could be used for applications such as datalogging, MP3 file storage - anything that needs more memory for storage than available on the AVR chip. |
| QUOTE |
| Sorry if I am misundestanding your question but the Butterfly already runs code at 1MHz. It is my undestanding that the 32.768KHz crystal output is fed to Timer/counter2 for use in a real time clock type of application. The system clock uses the internal RC oscillator which I believe actually runs at 8MHz but is divided down internally to 1MHz. Again, as I understand it you can change this in software to run at 8, 4, or 2MHz as well. Clearly there's a lot I don't understand. A friend and I have been debating this on email. |
| CODE |
| void Initialization(void) { char tst; // dummy OSCCAL_calibration(); // calibrate the OSCCAL byte CLKPR = (1<<CLKPCE); // set Clock Prescaler Change Enable // set prescaler = 8, Inter RC 8Mhz / 8 = 1Mhz CLKPR = (1<<CLKPS1) | (1<<CLKPS0); |
| QUOTE |
| From "AVR Butterfly Evaluation Kit User Guide" Atmel document 4271A–AVR–07/03 we find that it is the same display as on the STK502. |
| CODE |
| Note: The LCD-display on the STK502 can be ordered separately from ACTE Norway (www.acte.no). Phone: +47 63 89 89 00 Fax: +47 63 87 90 00 E-mail: info@acte.no Price: NOK 99,- Ordering number: H4042-DL DE5156/L. |
| QUOTE |
| Since no manufacturer is listed in the Bill of Materials, it could very well be a custom/semi-custom display built just for these applications. Once your quantities reach into the thousands semi-custom LCDs are not cost prohibitive. |
| QUOTE |
| Figure 4.1 of the STK502 User Guide shows the manufacturer as Hitech Displays, the part number is H4042-DL DE5127/L. Their website is www.hitech-lcd.com. I contacted them a while ago. They quoted me US$3.00 each for order of 100 (FOB Singapore). Their contact email is hdisplay@singnet.com.sg |
| QUOTE |
| If you are lucky and the external crystal option is selected you might try clicking on the STK500 icon in Studio and changing the Oscillator selection to 32.7KHz (click on the Board tab). I have no idea if this will work, just thought I would suggest it. If you are unlucky the external oscillator option is selected. Now you will need to inject a clock signal into the m169 (I forget whether its XTAL1 or XTAL2, the datasheet will tell you). I am not sure if you will have to unsolder the 32.768KHz crystal or not. I have read here that you will need to inject something like a 500KHz clock I think. Perhaps someone could provide a link to a thread where this procedure is discussed in more detail. |
| QUOTE |
| I was not referring to High Voltage programming but that possibly is another solution (never tried it myself and not familiar with that section of the Butterfly manual, that is why I say possibly). I was referring to using an external function generator or some other type of oscillator and inputting that signal into the XTAL1 pin of the m169. This may be necessary if the fuses accidently get set for the external oscillator option. Note this is different than the fuses being set for the external crystal option. An external oscillator is like one of those metal cans with 4 legs that can fit into a DIP socket. An external crystal can also come in a metal can but only has 2 legs and requires 2 capacitors. |
| QUOTE |
| I'm *guessing* you should remove the coin cell. Unless it is diode protected (I doubt it is), putting other batteries on there that have a higer voltage will try to charge the coin cell - bad form. 10,000A will kill a lot fo things There is a thing called Ohm's law that comes into play. If you can treat the butterfly as just a resistor (not too bad an approximation) then the current it draws will be determined by the voltage you apply to it - not how much your power supply (batteries, Hoover Dam, etc) can deliver. I think that's what you meant - would using a higher voltage power supply draw higher current? Generally that is true. If you have the header stock, a quick way of hooking up if you don't have the actual connector is to use wire-wrap wire. Header posts take to wire wrap wire like the were made for it - and they basically were. It isn't permanent but gives a really good connection that you can just pull off when you are done. You can get a cheap but very servicable wire wrap tool at Radio Shack or similar. |
| CODE |
| The Butterfly coin cell is diode-protected. There is no need to remove it. If you need your own copy of the schematic. |
| QUOTE |
| If you have any junk cables from a computer motherboard, like disk drive cables or serial port cables, the spacing should be the same (0.1"" square), and the ribbon cable is already connected to one end. |
| QUOTE |
| Take a look into the file test.c in the butterfly-application source. This will give you an idea of how it works. The datasheet for the flash-chip, an application note "using Dataflash" and an application note describing the interfacing between an AVR and a Dataflashs to store "audio-data" (using software-spi IRC) is available at atmel.com |
| QUOTE |
| Maximum input voltage is just the maximum voltage you can apply without the chip totally melting down. It may or may not function at those ratings - as I think the 'absolute maximum ratings' say something along those lines. |
| QUOTE |
| Vcc is not considered an input. It is rated at the value you metioned, 2.5V - 3.6V. Inputs pins have a higher range because Atmel made them easier to interface with micros. Now, a 5V micro can connect directly to a Dataflash, you still need to give the Dataflash 3.3V for Vcc, but the signal lines go directly from micro to Dataflash. If you look at MultiMediaCards (MMC), they only allow 3.3V on input pins, so it is necessary to convert the voltages of the output pin of the microcontrollers from 5V to 3.3V, assuming you are running a 5V processor. If you are running a 3.3V processor, no big deal. In all, I would not suggest powering your Dataflash at 5V, but it is ok to interface it with a 5V micro. |
| QUOTE |
| I would recommend a 100 ohm or maybe alittle smaller resistor in series on each of the lines between the micro to the dataflash. micro vcc = 5v, dataflash vcc =3.3v the micro will sense a 3.3v level as a 1 no problem. 100 ohm should be good. |
| QUOTE |
| Dataflash i/o can endure 5v but vcc must be 2.5-3.6v To generate 3.3v I suggest use special voltage regulator chip. Divided from 5v by resistor or three diodes is not a good idea even though that is suggested by ATMEL applycation note.Because the consume current differs greatly betwen working(especialy writting) and idle. |
| QUOTE |
| I just got the butterfly to dork around with a little while ago and came across some initial problems with sending a name to it with the uart. So I know it can be frustrating if it doesn't work right away. Have you soldered in the header pins yet? This is essential if you want to get a good conection, if you are a soldering freak (like myself) this tedious task will be quite enjoyable. |
| QUOTE |
| Anyways, spend some time and make a nice cable with a D-shell and a header connector and be sure to triple check the wiring (it is really not clear which wires cross in the ap-note). Double check your hyperterminal settings...yadda, yadda ...and be patient. |
| QUOTE |
| I've connected Butterfly to PonyProg2000 without problems via ISP and LPT programmer for it. Only one problem I found, that my programming cable is too long (about1,5 meeters). With other Megas I has some problem, but coupling capacitors helps well. I powered Butterfly from programmer with 5 volts. |
| QUOTE |
| To test the rs232 look for about -10V on both the Tx and Rx lines, If one is negative but the other is not then suspect crossed over. |
| QUOTE |
Quite often the fact that the Butterfly does NOT echo back characters to a Terminal Program fools many into thinking that it is not working. |
| QUOTE |
| Have you initialised the LCD controller? Do you get anything displayed on the LCD at all? Which language are you programming in? The butterfly source code is available, you could use that as an example. There are three functions to be accomplished: 1) initialise LCD controller 2) mapping ASCII text to segment buffer 3) interrupt handler to update LCD from buffer |
| QUOTE |
| you will need asnother level converter for teh additional signals. Then you can use any free I/O's of the m169. (Though you may want to try and use some of the INT lines for the more important signals) |
| QUOTE |
| There is no danger of overwriting - the boot loader section is the last 2K of flash memory and is protected by lock bits. I have flashed my butterfly > 50 times with no problems. |
| QUOTE |
| If I had to guess, I think that the error is in the block diagram, not in the table. Compare the block diagram and table to those of the Mega64 or other AVRs with programmable ADC gain. The '169 does not have that feature, and those are the slots in the table. |
| QUOTE |
| When I first saw that in an AVR datasheet, I also noted that with puzzlement. Then I realized that making a conversion of the channel against itself would give the offset error for part of the circuitry, which could then be applied to a "normal" conversion. Note also that the differential channels seem to have a lower (8 bit) typical accuracy, according to the datasheet. |
| QUOTE |
| Although it may seem strange, any of the inputs ADC0-ADC2 can be either the positive or negative input to the diff amp. The first differential mux selection (10000) uses ADC1 the (-) input and ADC0 as the (+). Its not that ADC0 was omitted. It's just never used as the negative input (although according to the block diagram it could have been). On your point about ADC1 and ADC2 being used as both the positive and negative inputs simultaneously - I don't know. It doesn't seem logical. However, if I were to take a wild guess, I would say that this is a single ended conversion selection with gain. Hopefully someone else has had experience with this setting. |
| CODE |
| I emailed Atmel about the problem and they said the the block diagram in the 169 datasheet is incorrect. The table is correct ADC0 can NOT be used as a negative input. Mega169 does not include any Gain as well. |
| QUOTE |
| Are all the butterflys out there programming eeprom ok? Let me know of your experiences. My butterfly board has an E.S. chip on it. I guess its an engineering sample. Is this a problem with the E.S. m169 chip? |
| QUOTE |
| I had similar errors with serial programming (with the internal bootloader) and the normal flash. But the applications work well. Then i switch to an ISP Dongle and Ponyprog and now i have no more errors. |
| QUOTE |
| Has anybody succeeded in using stk500 to program eeprom data into the butterfly. The jtag does not succeed in programming the internal eeprom. |