Writing in EEPROM and reading by 6502

Building your first 6502-based project? We'll help you get started here.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Writing in EEPROM and reading by 6502

Post by GARTHWILSON »

There seems to be some quantitizing error making it hard to follow in the picture. It will make it easier if you put a little dead time between bytes.
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?
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

GARTHWILSON wrote:
There seems to be some quantitizing error making it hard to follow in the picture. It will make it easier if you put a little dead time between bytes.
How can I do this? Put a little dead time between bytes?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Writing in EEPROM and reading by 6502

Post by GARTHWILSON »

The easiest would be to just put a delay loop between bytes as you send them, to take up enough time that you can clearly see the marking time in between, then see the start bit for each byte.
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?
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Writing in EEPROM and reading by 6502

Post by BigEd »

I'd suggest you sample at least 4x faster - or post an image at least 4x wider, which is what I really mean. See the narrowest pulses? They have different widths in the image you posted, but in reality they must all be the same width. For anyone to figure out the bit boundaries, they need an idea of where bits start and end, so a bit more resolution would be helpful.
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Writing in EEPROM and reading by 6502

Post by BitWise »

hitlp wrote:
Hello guys. It's me again.

I came back with a new 6502 processor and by the time I communicated with the ACIA (6551) it worked correctly. Now I'm trying to do a serial output with "Hello World!". I'm trying to use Putty but I do not see anything in the text output. Using the logic analyzer, every time I press the 6502 reset, it "spits" the same output. But I can not analyze it.

What can it be now? :(
Check the cables, that you have the right serial port selected and the right baud rate.

You can check your serial port is working by looping TXD back to RXD and sending a few characters.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

Hello guys. It's me one more time.

I checked the cables, looped the TX and RX and I can receive the sent characters correctly.

I'm using a baudrate of 9600. Below is the logical analysis of when I press some character on the keyboard. Look through the zero channel of the analyzer that nothing happens.
captura05.PNG
captura05.PNG (4.73 KiB) Viewed 548 times
Below the analyzer brings the result of when I press the reset. I tried to increase the resolution. See if you can see better this way. Because of the resolution of my notebook, I could not get a better print. NOTE: Images are not on the same time scale. The first catch event is very fast.
captura06.PNG
captura06.PNG (5.09 KiB) Viewed 548 times
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

Folks! Good news.

It worked. The problem was in the ACIA baudrate. I use a 1.8432 MHz crystal connected to ACIA ports 6 and 7. Port 7 before was connected to a capacitor and it was on GND. I removed the capacitor and it worked. The baudrate of 9600 was accurate!

  : D: D: D: D: D

A long time ago I was not so happy to see a Hello World! on my screen!

I'll send more news. Thank you all!!!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Writing in EEPROM and reading by 6502

Post by BigEd »

(You found your problem while I was composing this - I made a mistake at first and got nonsense, but corrected myself and now it shows that it is possible to decode serial data manually.)
Quote:
Great, so if you can mock up a grid to show each bit time, or pair of bit times, and align it so you can mark off sets of ten bit-times, can you arrange that so you see a zero start bit then 8 data bits then a one stop bit? I think you probably can, and that's encouraging.

I think I see these pulse widths:

Code: Select all

412111 11112211 321211 321211 141211 6121 13111111 141211 212311 321211 312211 11...
which is

Code: Select all

0  0001 0010  1
0  1010 0110  1
0  0011 0110  1
0  0011 0110  1
0  1111 0110  1
0  0000 0100  1
0  1110 1010  1
0  1111 0110  1
and so on...
which would be

Code: Select all

48 65 6C 6C 6F 20 57 6F...
which makes "Hello Wo..."
Post Reply