??? 07/29/09 17:37 Modified: 07/29/09 18:09 Read: times |
#168006 - CONGRATULATIONS Responding to: ???'s previous message |
Congrats on programming the USB ATMEL chip. Unfortunately, I was about to reply to your previous post to NOT set that bit unless you had a jump to bootloader command in your program and that you could access the chip via USB as maybe an HID. ATMEL does have source code for VC++ that allows access or you can pick up any HID terminal for free from the internet (example: http://www.lvr.com/files/SimpleHIDWrite3.zip). However, this only works if you set up your MCU as an HID. Unfortunately, I was never (I spent 1 day on it) able to succeed in setting the proper HW conditions necessary for ISP once that bit had become set and fortunately, I had 2 chips. If you do figure out a fool proof method, please let me know. Once I was able to get the MCU to work properly as an HID and that I could use host software to set the program to bootloader mode via HID commands I would turn on the BLJB bit as a FINAL step. As a further note, I have a very vague understanding of what youre doing and so I must respond with a vague response. There are a couple of conditions that will make it where your outputs stop after disconnecting the USB cable.
1.) You lost power that is delivered from the USB cable. a.) This can also cause you to have to keep pressing "start" in FLIP because you had not set the BLJB bit. b.) You just set the BLJB bit which means that your program will always run and you should verify this once you plug in the USB cable or apply the necessary power. 2.) Your program is stuck in a loop somewhere that uses USB communications. For example, you are not properly enumerating the USB. a.) This only applies if you were trying to use USB communications instead of using it purely for ISP and power. To help you out further, you might try using a different power source than straight from the USB cable to generate the necessary ISP conditions (dont forget the 1k resistor that they mention in the datasheet). I did not try that. Modification: I just reviewed the datasheet. I forgot one necessary hardware condition when I was trying, I believe. For PLCC52 and QFP64 packages: VCC must be connected first and chip should have power. Then EA must be tied to VCC (+5V). This I forgot to do. Then /RST must be tied directly to ground. Then /PSEN must be tied to ground through a 1K resistor. Release the /RST and wait. Then release /PSEN and EA. You might have to reset the MCU again, but try without resetting it first. The idea is that EA = 1 and PSEN = 0 on the rising edge of /RST when EA and PSEN are sampled. Hope that works. |
Topic | Author | Date |
AT89C5131 | 01/01/70 00:00 | |
are you using the ATMEL 'cable' made by Atmel or.... | 01/01/70 00:00 | |
not using Atmel cable | 01/01/70 00:00 | |
looking for a reason to use that term? | 01/01/70 00:00 | |
Kitchen table programmer | 01/01/70 00:00 | |
Cite ? | 01/01/70 00:00 | |
Notes on Programming the Atmel USB 8051 | 01/01/70 00:00 | |
Try 16MHz crystal | 01/01/70 00:00 | |
not working | 01/01/70 00:00 | |
set the BLJB | 01/01/70 00:00 | |
CONGRATULATIONS | 01/01/70 00:00 | |
API routines | 01/01/70 00:00 | |
API Routines![]() | 01/01/70 00:00 |