Daryl's 6502 SBC help
Re: Daryl's 6502 SBC help
Hi Jeff, thanks for the reply.
I'm not using IRQB or NMIB
The IRQB and NMIB pins are connected to 5v through a 3.3kohm resistor.
The only reset that seems to be triggering is normal RESET.
Just in case I made all my reset vectors go to the begging of the test program at $8000
The reset wont trigger if I use the arduino I/O pin as a clock. Program runs fine.
But when I switch to the can oscillator (1MHz) that's when program doesn't run and reset vector pin goes HIGH & LOW
Thanks
I'm not using IRQB or NMIB
The IRQB and NMIB pins are connected to 5v through a 3.3kohm resistor.
The only reset that seems to be triggering is normal RESET.
Just in case I made all my reset vectors go to the begging of the test program at $8000
The reset wont trigger if I use the arduino I/O pin as a clock. Program runs fine.
But when I switch to the can oscillator (1MHz) that's when program doesn't run and reset vector pin goes HIGH & LOW
Thanks
Re: Daryl's 6502 SBC help
OK, it's time for a thorough review of some details. For example you may have a wiring error (meaning either a wire not connected according to plan, or a plan which itself contains an error).
Alright, you need to check they're actually at 5V, then. This is the kind of detailed double-checking I mean. There could be a flaky connection, an error with the resistor color code, or even a defective resistor -- it happens! But we want IRQB and NMIB at 5V, so check that they really are.
OK, but that doesn't mean your program will work correctly when faced with spurious interrupts. (It can't work correctly, as it would be continually restarting.)
I'll admit it seems odd. But construction errors often present with odd symptoms. Can you post some photos? It's hard for us to help when we can't see what's going on! 
beholder wrote:
The IRQB and NMIB pins are connected to 5v through a 3.3kohm resistor.
Quote:
Just in case I made all my reset vectors go to the begging of the test program at $8000
Quote:
The reset wont trigger if I use the arduino I/O pin as a clock. Program runs fine.
But when I switch to the can oscillator (1MHz) that's when program doesn't run and reset vector pin goes HIGH & LOW
But when I switch to the can oscillator (1MHz) that's when program doesn't run and reset vector pin goes HIGH & LOW
Last edited by Dr Jefyll on Tue Sep 20, 2016 8:29 pm, edited 1 time in total.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Daryl's 6502 SBC help
Dr Jefyll wrote:
Pin 1 (VPB) goes low when a vector is being fetched. This could mean Reset, but altogether there are three vectors to consider: reset (triggered by the RESB pin) and the two interrupts (triggered by IRQB and NMIB).
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Daryl's 6502 SBC help
Dr Jefyll wrote:
Can you post some photos? It's hard for us to help when we can't see what's going on! 
Incidentally, I hope RDY and BE are being pulled up.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Daryl's 6502 SBC help
Hi Jeff and BDD. Thanks for the help!
I tested and IRQB, NMIB, RDY and BE are HIGH (oscillating between 4 to 5v)
I have no BRK in my code, no interrupt either.
Its just incrementing a 16 bit value from 0000 to FFFF and outputing it on VIA port A&B.
I took out the can oscillator and put it on a breadboard. Works and I can see the signal.
However I noticed the can voltage is from 0 to 3.3v! I wonder if I have a 3.3v logic and if that would cause the 6502 to not tick or reset
Will post pics soon!
I tested and IRQB, NMIB, RDY and BE are HIGH (oscillating between 4 to 5v)
I have no BRK in my code, no interrupt either.
Its just incrementing a 16 bit value from 0000 to FFFF and outputing it on VIA port A&B.
I took out the can oscillator and put it on a breadboard. Works and I can see the signal.
However I noticed the can voltage is from 0 to 3.3v! I wonder if I have a 3.3v logic and if that would cause the 6502 to not tick or reset
Will post pics soon!
Re: Daryl's 6502 SBC help
Here's the can oscillator I bought:
http://www.mouser.com/Search/ProductDet ... HST-3C-1.0
Datasheet says operating voltage 5v
But My peak is definitely below 3.5v
I wonder if Mouser sent me a 3.3v instead :/
http://www.mouser.com/Search/ProductDet ... HST-3C-1.0
Datasheet says operating voltage 5v
But My peak is definitely below 3.5v
I wonder if Mouser sent me a 3.3v instead :/
Re: Daryl's 6502 SBC help
The datasheet says the output high will be 2.4V or more - that's TTL compatible. But might not be good enough to drive a CMOS part's clock input. Perhaps you can put the clock through a buffer?
Re: Daryl's 6502 SBC help
Thanks Ed.
Apparently I can't read datasheets very well
I believe I do have a buffer ic somewhere. Will try using it!
What would be a good place to get a 1Mhz half can that outputs 5v logic?
I've already soldered a half can socket and have no space
Thanks
Apparently I can't read datasheets very well
I believe I do have a buffer ic somewhere. Will try using it!
What would be a good place to get a 1Mhz half can that outputs 5v logic?
I've already soldered a half can socket and have no space
Thanks
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Daryl's 6502 SBC help
beholder wrote:
I've already soldered a half can socket and have no space
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Daryl's 6502 SBC help
Hi Garth, sorry for my bad writing! I do have the socket soldered, not the oscillator 
I meant, hope I can find a 8 pin half can oscillator because I dont have room for a 14 one.
I found this 1Mhz half can oscillator at digikey:
http://www.digikey.com/product-detail/e ... 9-ND/39059
Datasheet says output minimum is 4.5v. I guess that's the one I should use it?
Thanks!
I meant, hope I can find a 8 pin half can oscillator because I dont have room for a 14 one.
I found this 1Mhz half can oscillator at digikey:
http://www.digikey.com/product-detail/e ... 9-ND/39059
Datasheet says output minimum is 4.5v. I guess that's the one I should use it?
Thanks!
Re: Daryl's 6502 SBC help
Used a 74HC541 and now my 1MHz oscillator works!
Nest step, try serial!
Thanks guys
Nest step, try serial!
Thanks guys
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Daryl's 6502 SBC help
beholder wrote:
I found this 1Mhz half can oscillator at digikey:
http://www.digikey.com/product-detail/e ... 9-ND/39059
Datasheet says output minimum is 4.5v. I guess that's the one I should use it?
Thanks!
http://www.digikey.com/product-detail/e ... 9-ND/39059
Datasheet says output minimum is 4.5v. I guess that's the one I should use it?
Thanks!
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Daryl's 6502 SBC help
Thanks BDD.
I always have a hard time fully understanding the electronics side of projects like that.
Programming is fine, but when comes to datasheets I get confused easily
Had a tiny progress this morning. Now that my oscillator is working I went back to getting my serial connection working.
Wrote a simple test code to write out "OK" again and again as you type anything back to the SBC.
I output the Status and Data registers into the VIA outputs so I can monitor with my arduino.
When I type I can see that my VIA values change, so SBC is receiving data from my ftdi.
I can see that the FTDI RX (ACIA TX) led lights up, but I cant my terminal doesnt get anything.
So... its semi working
Connection is at 19200 8N1
Here's the code:
I always have a hard time fully understanding the electronics side of projects like that.
Programming is fine, but when comes to datasheets I get confused easily
Had a tiny progress this morning. Now that my oscillator is working I went back to getting my serial connection working.
Wrote a simple test code to write out "OK" again and again as you type anything back to the SBC.
I output the Status and Data registers into the VIA outputs so I can monitor with my arduino.
When I type I can see that my VIA values change, so SBC is receiving data from my ftdi.
I can see that the FTDI RX (ACIA TX) led lights up, but I cant my terminal doesnt get anything.
So... its semi working
Connection is at 19200 8N1
Here's the code:
Code: Select all
* = $8000
8000 ACIA_D = 7F70
8000 ACIA_S = 7F71
8000 VIA_A = 7F50
8000 VIA_B = 7F51
8000 LDA #$FF A9 FF
8002 STA $7F52 8D 52 7F
8005 STA $7F53 8D 53 7F
8008 LDA #$0B A9 0B
800A STA $7F72 8D 72 7F
800D STA VIA_A 8D 50 7F
8010 LDA #$1F A9 1F
8012 STA $7F73 8D 73 7F
8015 STA VIA_B 8D 51 7F
8018 START
8018 LDA #$4F A9 4F
801A JSR TX 20 2A 80
801D LDA #$4B A9 4B
801F JSR TX 20 2A 80
8022 LDA #$0A A9 0A
8024 JSR TX 20 2A 80
8027 JMP RX 4C 3D 80
802A TX LDA ACIA_S AD 71 7F
802D STA VIA_A 8D 50 7F
8030 AND #$10 29 10
8032 BEQ TX F0 F6
8034 LDA #$AA A9 AA
8036 STA ACIA_D 8D 70 7F
8039 STA VIA_B 8D 51 7F
803C RTS 60
803D RX LDA ACIA_S AD 71 7F
8040 STA VIA_A 8D 50 7F
8043 AND #$08 29 08
8045 BEQ RX F0 F6
8047 LDA ACIA_D AD 70 7F
804A STA VIA_B 8D 51 7F
804D JMP START 4C 18 80
Re: Daryl's 6502 SBC help
Oops! small fix to the code! Was outputting $AA instead of OK
Code: Select all
pass 2
* = $8000
8000 ACIA_D = 7F70
8000 ACIA_S = 7F71
8000 VIA_A = 7F50
8000 VIA_B = 7F51
8000 LDA #$FF A9 FF
8002 STA $7F52 8D 52 7F
8005 STA $7F53 8D 53 7F
8008 LDA #$0B A9 0B
800A STA $7F72 8D 72 7F
800D STA VIA_A 8D 50 7F
8010 LDA #$1E A9 1E
8012 STA $7F73 8D 73 7F
8015 STA VIA_B 8D 51 7F
8018 START
8018 LDA #$4F A9 4F
801A JSR TX 20 2A 80
801D LDA #$4B A9 4B
801F JSR TX 20 2A 80
8022 LDA #$0A A9 0A
8024 JSR TX 20 2A 80
8027 JMP RX 4C 3D 80
802A TX PHA 48
802B LOOP LDA ACIA_S AD 71 7F
802E STA VIA_A 8D 50 7F
8031 AND #$10 29 10
8033 BEQ LOOP F0 F6
8035 PLA 68
8036 STA ACIA_D 8D 70 7F
8039 STA VIA_B 8D 51 7F
803C RTS 60
803D RX LDA ACIA_S AD 71 7F
8040 STA VIA_A 8D 50 7F
8043 AND #$08 29 08
8045 BEQ RX F0 F6
8047 LDA ACIA_D AD 70 7F
804A STA VIA_B 8D 51 7F
804D JMP START 4C 18 80
done.Re: Daryl's 6502 SBC help
Ok! Got my first serial data sent back and forth between my computer and the SBC!!!!!
Hurray!
The bad news... it only works if I have my arduino providing the clock
It's very strange because I have the 1MHz oscillator going through a 75hc541 and now the voltage is between 0-4.5v.
I can see through my VIA outputs that the SBC is receiving data from serial and outputting values through the VIA ports, but no data goes from SBC to my computer.
It's so bizarre, all I have to do is switch the oscillator with the arduino and it works! I can see in my terminal window the word "OK"
At least now I know is something to do with my 1MHz can oscillator.
Back to more testing
I wont give up!
Hurray!
The bad news... it only works if I have my arduino providing the clock
It's very strange because I have the 1MHz oscillator going through a 75hc541 and now the voltage is between 0-4.5v.
I can see through my VIA outputs that the SBC is receiving data from serial and outputting values through the VIA ports, but no data goes from SBC to my computer.
It's so bizarre, all I have to do is switch the oscillator with the arduino and it works! I can see in my terminal window the word "OK"
At least now I know is something to do with my 1MHz can oscillator.
Back to more testing
I wont give up!