Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #492401 > unrolled thread
| Started by | mpm <mpmillard@aol.com> |
|---|---|
| First post | 2018-01-24 18:23 -0800 |
| Last post | 2018-02-01 07:32 -0800 |
| Articles | 12 — 9 participants |
Back to article view | Back to sci.electronics.design
Ack!! AT89S8253 (8051 microcontroller problem) mpm <mpmillard@aol.com> - 2018-01-24 18:23 -0800
Re: Ack!! AT89S8253 (8051 microcontroller problem) Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> - 2018-01-25 02:25 +0000
Re: Ack!! AT89S8253 (8051 microcontroller problem) Sylvia Else <sylvia@not.at.this.address> - 2018-01-25 13:36 +1100
Re: Ack!! AT89S8253 (8051 microcontroller problem) Winfield Hill <hill@rowland.harvard.edu> - 2018-01-24 18:41 -0800
Re: Ack!! AT89S8253 (8051 microcontroller problem) bitrex <bitrex@de.lete.earthlink.net> - 2018-01-24 22:58 -0500
Re: Ack!! AT89S8253 (8051 microcontroller problem) TTman <kraken.sankey@gmail.com> - 2018-01-25 11:45 +0000
Re: Ack!! AT89S8253 (8051 microcontroller problem) bitrex <bitrex@de.lete.earthlink.net> - 2018-01-25 09:17 -0500
Re: Ack!! AT89S8253 (8051 microcontroller problem) mpm <mpmillard@aol.com> - 2018-01-25 19:26 -0800
Re: Ack!! AT89S8253 (8051 microcontroller problem) Perry <Perry@null.com> - 2018-01-26 11:39 +0800
Re: Ack!! AT89S8253 (8051 microcontroller problem) George Herold <gherold@teachspin.com> - 2018-01-26 13:27 -0800
Re: Ack!! AT89S8253 (8051 microcontroller problem) bitrex <bitrex@de.lete.earthlink.net> - 2018-01-25 22:41 -0500
Re: Ack!! AT89S8253 (8051 microcontroller problem) jack4747@gmail.com - 2018-02-01 07:32 -0800
| From | mpm <mpmillard@aol.com> |
|---|---|
| Date | 2018-01-24 18:23 -0800 |
| Subject | Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <bd4fbaf6-80c7-42e6-84fd-475bf1b2cb33@googlegroups.com> |
For the life of me, I don't know what is wrong. And I'm on a deadline. I'm trying to bit-bang an 8-CH, 12-bit A/D converter. It's a Microchip MCP3208, attached to port-1. Although it is connected to the uPC's SPI port, I'm not using that feature because my development tools don't support it natively, and I don't have time to mess with workarounds. The SPI's functions are disabled (SRF's), so Port-1 should just behave as normal port. Right? Well, I'm getting "4095" returned on every read (i.e., the max value, 2^12) - which is definitely incorrect. I have fiddled with the ADC timing ad nauseam. Do I need to put a pull-up on Port-1? On the scope, it does sort of look like I'm having trouble holding the pin high on Chip Select and MISO and the other two really aren't pretty and sharp either (for no obvious reason)? I'm clocking at 2x with 11.0592 xtal. I should note: My board is laid out EXACTLY the same as my (tried and true!) development board (which does not exhibit this issue), and on which, my code works perfectly, even when swapping physical processor chips. I did trace an unrelated to issue to my programmer/ISP not tri-stating after a programming session, which is a manageable annoyance.. but only barely. So, I just have to say... WTF? Honestly, after two days (on and off) and a lot of external time pressures for delivery, this is really starting to piss me off. I must be doing something truly stupid. (Wouldn't be the first time!) Anybody got any ideas, or ever run into an ADC problem like this before? It's not like this is cutting-edge hardware. It's a lot of code, so I really have few options other than to get this piece of it working via bit-bang. Too much low-level optimized code in other areas to switch to some different development tool with better SPI support (and really, no guarantee that would work anyway, since I don't even know what's wrong.) The hand-soldering and PCB look good. Aargh.!! I guess I'm just venting. This is not an ADC I'm all that familiar with.
[toc] | [next] | [standalone]
| From | Long Hair <DecadentLinuxUserNumeroUno@decadentlinuxuser.org> |
|---|---|
| Date | 2018-01-25 02:25 +0000 |
| Message-ID | <p4bf7i$k4q$1@gioia.aioe.org> |
| In reply to | #492401 |
mpm wrote: > The hand-soldering and PCB look good. > > Aargh.!! I guess I'm just venting. > This is not an ADC I'm all that familiar with. > You're just not holding your tongue right. ;-P
[toc] | [prev] | [next] | [standalone]
| From | Sylvia Else <sylvia@not.at.this.address> |
|---|---|
| Date | 2018-01-25 13:36 +1100 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <fcsu5aFqse5U1@mid.individual.net> |
| In reply to | #492401 |
On 25/01/2018 1:23 PM, mpm wrote: > The hand-soldering and PCB look good. Even then you could have a dry joint. I've had perfectly sound looking solder joints have zero conduction. If you haven't already, I'd suggest doing continuity testing pin to pin. Sylvia.
[toc] | [prev] | [next] | [standalone]
| From | Winfield Hill <hill@rowland.harvard.edu> |
|---|---|
| Date | 2018-01-24 18:41 -0800 |
| Message-ID | <p4bg5h02ksv@drn.newsguy.com> |
| In reply to | #492401 |
mpm wrote...
>
> I'm trying to bit-bang an 8-CH, 12-bit A/D converter.
> It's a Microchip MCP3208, attached to port-1.
Have you carefully checked the CS line timing?
--
Thanks,
- Win
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2018-01-24 22:58 -0500 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <kBcaC.449003$uY5.303066@fx21.iad> |
| In reply to | #492401 |
On 01/24/2018 09:23 PM, mpm wrote: > For the life of me, I don't know what is wrong. > And I'm on a deadline. > > I'm trying to bit-bang an 8-CH, 12-bit A/D converter. > It's a Microchip MCP3208, attached to port-1. > > Although it is connected to the uPC's SPI port, I'm not using that feature because my development tools don't support it natively, and I don't have time to mess with workarounds. The SPI's functions are disabled (SRF's), so Port-1 should just behave as normal port. Right? > > Well, I'm getting "4095" returned on every read (i.e., the max value, 2^12) - which is definitely incorrect. I have fiddled with the ADC timing ad nauseam. > > Do I need to put a pull-up on Port-1? > On the scope, it does sort of look like I'm having trouble holding the pin high on Chip Select and MISO and the other two really aren't pretty and sharp either (for no obvious reason)? I'm clocking at 2x with 11.0592 xtal. U know the datasheet specifies a 2 MHz clock freq _max_ @ 5 volts, yeah?
[toc] | [prev] | [next] | [standalone]
| From | TTman <kraken.sankey@gmail.com> |
|---|---|
| Date | 2018-01-25 11:45 +0000 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <p4cg1j$u22$1@dont-email.me> |
| In reply to | #492401 |
> > It's a lot of code, so I really have few options other than to get this piece of it working via bit-bang. Too much low-level optimized code in other areas to switch to some different development tool with better SPI support (and really, no guarantee that would work anyway, since I don't even know what's wrong.) > > The hand-soldering and PCB look good. > > Aargh.!! I guess I'm just venting. > This is not an ADC I'm all that familiar with. > Try pull ups on P1.... seems to ring a bell with me from way way back. I did lots of designs with 98c52 then moved up to /LS8252/3 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2018-01-25 09:17 -0500 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <EFlaC.584143$4Z6.277711@fx41.iad> |
| In reply to | #492446 |
On 01/25/2018 06:45 AM, TTman wrote: > >> >> It's a lot of code, so I really have few options other than to get >> this piece of it working via bit-bang. Too much low-level optimized >> code in other areas to switch to some different development tool with >> better SPI support (and really, no guarantee that would work anyway, >> since I don't even know what's wrong.) >> >> The hand-soldering and PCB look good. >> >> Aargh.!! I guess I'm just venting. >> This is not an ADC I'm all that familiar with. >> > Try pull ups on P1.... seems to ring a bell with me from way way back. I > did lots of designs with 98c52 then moved up to /LS8252/3 > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > If I'm not misunderstanding the OP's post it seems like he's trying to run the chip at 20 times its specified max clock freq for its maximum supported sampling freq of 100ksps. If the input to the ADC channel is e.g. a full-scale low-frequency sine wave, if the sourcing impedance of the signal source is slightly lower than the sink impedance and the S&H RC time constant is long compared with the clock frequency, then the S&H will rapidly integrate the in-out charge imbalance right to the positive rail and it ain't never gonna come back down. Which is what seems to be happening. Slow down Speed Racer what's your hurry
[toc] | [prev] | [next] | [standalone]
| From | mpm <mpmillard@aol.com> |
|---|---|
| Date | 2018-01-25 19:26 -0800 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <83a85364-2b12-449f-ab86-567f679aeeab@googlegroups.com> |
| In reply to | #492452 |
On Thursday, January 25, 2018 at 9:17:18 AM UTC-5, bitrex wrote: > If I'm not misunderstanding the OP's post it seems like he's trying to > run the chip at 20 times its specified max clock freq for its maximum > supported sampling freq of 100ksps. Actually, with an 11 MHz crystal, I don't think it's even possible to over-clock the ADC. It takes several dozen instruction cycles per read. But of course, I S-L-O-W-E-D down the bit-bang anyway with a bunch of NOP's.... to absolutely no avail. The problem turned out to be a couple things: Which... I'm too embarrassed to admit. :) But here's a hint: Thanks Sylvia! Anyway, working now!!!
[toc] | [prev] | [next] | [standalone]
| From | Perry <Perry@null.com> |
|---|---|
| Date | 2018-01-26 11:39 +0800 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <EomdnQ8i-_CbPvfHnZ2dnUU7-YudnZ2d@westnet.com.au> |
| In reply to | #492530 |
On 26-Jan-18 11:26 AM, mpm wrote: > On Thursday, January 25, 2018 at 9:17:18 AM UTC-5, bitrex wrote: >> If I'm not misunderstanding the OP's post it seems like he's trying to >> run the chip at 20 times its specified max clock freq for its maximum >> supported sampling freq of 100ksps. > > Actually, with an 11 MHz crystal, I don't think it's even possible to over-clock the ADC. It takes several dozen instruction cycles per read. But of course, I S-L-O-W-E-D down the bit-bang anyway with a bunch of NOP's.... to absolutely no avail. > > The problem turned out to be a couple things: > Which... I'm too embarrassed to admit. :) > But here's a hint: Thanks Sylvia! > > Anyway, working now!!! > We've all done that more than once!
[toc] | [prev] | [next] | [standalone]
| From | George Herold <gherold@teachspin.com> |
|---|---|
| Date | 2018-01-26 13:27 -0800 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <2cad4738-2192-4ec1-826a-e9bccaef111f@googlegroups.com> |
| In reply to | #492531 |
On Thursday, January 25, 2018 at 10:39:58 PM UTC-5, Perry wrote: > On 26-Jan-18 11:26 AM, mpm wrote: > > On Thursday, January 25, 2018 at 9:17:18 AM UTC-5, bitrex wrote: > >> If I'm not misunderstanding the OP's post it seems like he's trying to > >> run the chip at 20 times its specified max clock freq for its maximum > >> supported sampling freq of 100ksps. > > > > Actually, with an 11 MHz crystal, I don't think it's even possible to over-clock the ADC. It takes several dozen instruction cycles per read. But of course, I S-L-O-W-E-D down the bit-bang anyway with a bunch of NOP's.... to absolutely no avail. > > > > The problem turned out to be a couple things: > > Which... I'm too embarrassed to admit. :) > > But here's a hint: Thanks Sylvia! > > > > Anyway, working now!!! > > > > > We've all done that more than once! Grin, yup. Worse are intermittent cold solder joints. The hardest thing about trouble shooting is assuming you know what's wrong, and then chasing yourself down some blind rabbit hole. George H.
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2018-01-25 22:41 -0500 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <YrxaC.335873$lH5.184835@fx31.iad> |
| In reply to | #492530 |
On 01/25/2018 10:26 PM, mpm wrote: > On Thursday, January 25, 2018 at 9:17:18 AM UTC-5, bitrex wrote: >> If I'm not misunderstanding the OP's post it seems like he's trying to >> run the chip at 20 times its specified max clock freq for its maximum >> supported sampling freq of 100ksps. > > Actually, with an 11 MHz crystal, I don't think it's even possible to over-clock the ADC. It takes several dozen instruction cycles per read. But of course, I S-L-O-W-E-D down the bit-bang anyway with a bunch of NOP's.... to absolutely no avail. > > The problem turned out to be a couple things: > Which... I'm too embarrassed to admit. :) > But here's a hint: Thanks Sylvia! > > Anyway, working now!!! > Oh, right, it's an 8051. I've been spoiled by RISC uPs.
[toc] | [prev] | [next] | [standalone]
| From | jack4747@gmail.com |
|---|---|
| Date | 2018-02-01 07:32 -0800 |
| Subject | Re: Ack!! AT89S8253 (8051 microcontroller problem) |
| Message-ID | <e81af784-10e7-45e6-a4d3-ac15fa2d37f8@googlegroups.com> |
| In reply to | #492530 |
Il giorno venerdì 26 gennaio 2018 04:26:21 UTC+1, mpm ha scritto: > On Thursday, January 25, 2018 at 9:17:18 AM UTC-5, bitrex wrote: > > If I'm not misunderstanding the OP's post it seems like he's trying to > > run the chip at 20 times its specified max clock freq for its maximum > > supported sampling freq of 100ksps. > > Actually, with an 11 MHz crystal, I don't think it's even possible to over-clock the ADC. It takes several dozen instruction cycles per read. But of course, I S-L-O-W-E-D down the bit-bang anyway with a bunch of NOP's.... to absolutely no avail. > > The problem turned out to be a couple things: > Which... I'm too embarrassed to admit. :) > But here's a hint: Thanks Sylvia! pfff, the problems are always in the hardware, never in the software :D Bye Jack
[toc] | [prev] | [standalone]
Back to top | Article view | sci.electronics.design
csiph-web