Holiday break – Project update

Happy New Year to all readers!  2017 is the beginning of a new cycle as 2+0+1+7 = 10 or 1.

The holiday season did not bring much progress on this project nor the Z80 SBC project.  Instead, I mulled over some other things having to do with love, life, connections, path to happiness, etc.  It was inspiring … and once again, I found that the answer to the Ultimate Question of Life, the Universe, and Everything is STILL “42” as calculated by the supercomputer named “Deep Thought” over the course of 7.5 million years (… or so I have been told).

Continual intermittent oscillator failures: On the 8052 SBC project, the issue with the oscillator showed up again.  It may be temperature related or simply a faulty crystal.  I have two (2) 11.0592 MHz crystals and only a few values of capacitors (22, 27, 30 and 100 pf) on hand.  Thus, I ordered a few more values of capacitors from MOUSER.COM as I did not wish to wait 4 weeks by ordering from an eBay vendor in China.

I contacted ATMEL on the subject of directly driving the GAL22V10 using the XTAL2 output and the response was “yes, you can use the XTAL1 or XTAL2 pins to drive a buffer but we suggest you do not directly drive the GAL22V10″.

I have since inserted an ON-SEMI NL17SZ17, “Non-Inverting Schmitt-Trigger Buffer”  between the AT89C52’s XTAL2 pin and the GAL22V10 CLK pin but it did not resolve the intermittent oscillator failure problem.  I then switched to a 16 MHz  crystal using 27 pf loading capacitors and found the oscillator to be VERY stable.  In 20 to 30 repeated presses of the hardware reset button, which ALWAYS failed using the 11.0592 MHz crystal, the oscillator remained operational without even a single interruption. However, with the new crystal frequency, neither PAULMON2 nor the MCS-52 BASIC functioned.  I didn’t even receive garbage characters on the serial port, which would indicate a baud-rate mismatch.  I thought that the MCS-52 BASIC was supposed to auto-detect the baud-rate and the version 1.31 had support for 805x MCU’s running up to 40 MHz.  I have not yet checked the code to see if there is a culprit hidden within.  I do not think it is a RAM access timing issue because the RAM is static and rated for 15 nS cycle times (66 MHz) but the EEPROM is rated for 150 nS access time (6.66 MHz).  I need to look at the AT89C52’s timing diagrams to see where the upper limit of the RAM/ROM interface speed lies.

The good news is that the oscillator is stable at 16 MHz.  It is possible that these 11.0592 MHz crystals need larger loading capacitors than 30 pf or that they are “3rd overtone” types, which require a smaller set of loading capacitors than I have on-hand.  Since the ATMEL AT89C52 will run at 24 MHz, I am planning to use either a 16 MHz or 20 MHz crystal for the oscillator (barring any RAM/ROM access speed limits) and modify code if necessary.

Differences between AT89C52 and AT89S52 devices:  I previously wrote about my experiences with acquiring some AT89S52’s from an Chinese eBay vendor.  I ended up ordering a set of AT89C52’s instead because the 1st vendor never sent them.  The AT89C52’s came in a few weeks ago and I have been using one for this project.  I have a TL-866CS programmer, which works great with the AT89C52 in parallel programming mode.  I knew that the AT89S52 was In-System-Programmable and from what I recalled, so was the AT89C52, as the datasheet had stated, thus I had added a 6-pin ISP connector to the 8052 SBC for just that purpose.  Although, I knew that avrdude did not directly support the AT89 series of MCU’s but others had added support via a patch. I had also found s51dude, which uses the USBtinyISP programmer with a modified firmware.  The main difference between the AT89 series and the AVR8 series is that the AVR’s use an active-low reset while the 805x series uses an active-high reset.   Since I had two (2) sources for the RESET signal, I had fed the RST pin of the ISP header and the hardware reset switch to the GAL22V10, which feeds the the AT89C52’s RESET pin.  If need be, I could invert the ISP’s RESET state and hopefully solve the ISP RESET polarity difference but upon testing, I could not get the AT89C52 to respond.  As a matter of fact, the MISO pin showed no activity at all.  Upon another glance at the AT89C52’s datasheet, it seems that the AT89C52 IS in-system programmable BUT there is no direct reference to how to do so in the datasheet.  In researching more on this topic, I found the appropriate information in ATMEL’s “Design Guide for Atmel C51 Standard Devices.pdf“.  The AT89C52 is ISP but the PSEN pin must be held low during RESET, which activates the DFU boot-loader on the serial port.  Hmmm …. not what I had recalled when I glanced over the AT89C52 datasheet and certainly NOT what I had intended on the board.  Still, the part works fine for my testing purposes and I did order more of the AT89S52’s, so I will test the ISP capability using the MISO/MOSI pins when those parts arrive in a few weeks.

Advertisements

4 thoughts on “Holiday break – Project update

  1. Hi Dick:
    Thanks for the comment. I am still awaiting my capacitor assortment’s arrival. I tried one of the other 11.02592 MHz crystals (I have 3 of them) and it worked a little better but still eventually failed. They are eBay vendor crystals and although I have never had a problem with the 8 MHz and 16 MHz crystals I have purchased before, these 11.08592 MHz parts could be OEM failures that did not meet specification.

    As for drive, I have no control over the AT89C52’s drive capability. Adding a separate oscillator onto the PCB wasn’t something I had in mind either. 🙂

    Thanks for the input.

    Peace and blessings.

    Like

  2. Hi Dick:
    Keep in mind that I have the “CS” version of the TL-866. The “CS” version DOES NOT have the ISP option. For the ISP, you need to purchase a TL-866A.

    However, someone wrote instructions on how to upgrade the TH-866CS to the “A” version. Here are some links for those with a TL-866CS wishing they had purchased theTL-866A:

    http://blackstufflabs.com/2013/11/18/conversione-programmatore-tl866cs-a-tl866a/?lang=en
    https://abzman2k.wordpress.com/2013/06/12/upgrading-the-tl866cs-or-misadventures-with-pics/
    https://atariage.com/forums/topic/246355-minipro-tl866-upgrade-instructions/

    I know we’ve chatted a little bit about AVR ISP programmers in the past. The USBasp programmers are ATmega8 based and use a “standard” 10-pin ATMEL ISP header. They can be used with avrdude under Linux and WINDOWS(R) in a script (or batch) file.

    Peace and blessings.

    Like

  3. And while at it, Yeah, probably not enough load capacitance. Either that or maybe the crystals are sluggish and need more drive

    Like

  4. I am watching to see whether that TL-866CS is successful at in circuit programming. Is the user interface suitable for production programming?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s