Home  |  Contents 
Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: UNI/O EEPROM Driver Post ReplyPost New Topic
<< Prev Page of 5 Next >>
Author
Message << Prev Topic | Next Topic >>
astro1
Newbie
Newbie


Joined: 26 June 2016
Location: Australia
Online Status: Offline
Posts: 22
Posted: 22 July 2017 at 7:16am | IP Logged Quote astro1

Hi Geoff,
I'm using 11AA010T and it is reading fine on the MM with a status of 1 , but it is not writing, status is 0.

Option explicit
Dim integer data, status, i
Dim string s$

Print "write file"
Open "eprom" For input As #1
For i = 0 To 127
s$ = Input$(2, #1)
data = Val("&H"+s$)
status = unio(43, 02, i, 1, data)
Print status, data
Next i
Close #1

Print "read eeprom"
For i = 0 To 127
status = unio(43,01,i, 1, data)
Print status, Hex$(data,2)
Next i




Back to Top View astro1's Profile Search for other posts by astro1
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 22 July 2017 at 7:48am | IP Logged Quote Geoffg

Hi drkl/astro1,

All that I can say is that the driver works perfectly for me.

When I was developing it I did get a lot of errors which I put down to the rough breadboard test bed that I was using. But even with this the final driver worked well.

I don't think that your problems are in the driver, it must be something environmental. Try a different power supply (say 5V), a decoupling cap close to the chip, a pullup resistor and make sure that the signal lead and ground are short.

EDIT: It occurred to me that the test chips that I have are the 11AA161 (with the UNIO address of 1) and there could be something strange and different with yours that have a UNIO address of 0. Please try the attached version, this ignores the difference between the two and forces the address to zero. I don't think that it will make a difference but it is worth a test.
2017-07-22_081205_UNIO.zip

Geoff

Edited by Geoffg on 22 July 2017 at 8:14am


__________________
Geoff Graham - http://geoffg.net
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
drkl
Regular Member
Regular Member
Avatar

Joined: 18 October 2015
Location: Hungary
Online Status: Offline
Posts: 97
Posted: 22 July 2017 at 11:52am | IP Logged Quote drkl

Hi Geoff,

Again: filling the chip with 0 or 1 is OK. STATUS=1
The reading is ok, STATUS=1 The ROM content is all 0 or all 1
The writing is problem, STATUS=0
I try to use CPU 48, and i try to use 5V without success.
Can the timing of the writing be inappropriate?

drkl
Back to Top View drkl's Profile Search for other posts by drkl Visit drkl's Homepage
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 22 July 2017 at 2:49pm | IP Logged Quote Geoffg

The timing of both the read and write is very accurate (within 1%) - this was something that I found was necessary for reliable operation. I tested the driver from 30MHz to 48MHz on the MX170 but it was optimised for 40MHz and so it would be worthwhile trying it at 40MHz.

Geoff

__________________
Geoff Graham - http://geoffg.net
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2255
Posted: 22 July 2017 at 11:32pm | IP Logged Quote TassyJim

It might be worth trying different values for OPTION CLOCKTRIM depending on your room temperature.

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
astro1
Newbie
Newbie


Joined: 26 June 2016
Location: Australia
Online Status: Offline
Posts: 22
Posted: 22 July 2017 at 11:44pm | IP Logged Quote astro1

Hi Geoff,
New code has 2 'End CFunction' lines (107/115), looks like a copy/paste issue?
Reading ok, writing shows an error.

astro1
Back to Top View astro1's Profile Search for other posts by astro1
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 23 July 2017 at 1:24am | IP Logged Quote Geoffg

I don't know what is going on here, it should work for you, it works fine for me.

OPTION CLOCKTRIM should not make a difference, the chip is sensitive to timing jitter, not the actual frequency.

Have you tried my suggestions for reducing noise on the power and signal lines?

Geoff

__________________
Geoff Graham - http://geoffg.net
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2255
Posted: 25 July 2017 at 3:24am | IP Logged Quote TassyJim

My 11AA160 TO-92 arrived today.
Testing on a MX170 running 5.0404

Clear to all zeros works.
Clearing to all FF works.
Writing strings or numbers of any length fails.
Reading any length works.

I did notice that reading to a string variable, you end up with a 255 character string padded with zeros.
You have to do a LEFT$() to tame it.

I put a 0.01 capacitor across the supply pins close to the chip.

I put the cro on and did some experimenting with different values of pull-up resistor.
With no resistor, one direction goes from ~zero to a high of ~2.5V
With a 10k pull-up it goes from ~0.5V to 3.3V

That seems to agree with the data sheet.
I tried a 100k resistor and got close to full voltage swing so will stay with that.

Unfortunately, nothing gets the write data to work.

I will try with a different micromite (Explore64) later.

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 26 July 2017 at 2:39am | IP Logged Quote Geoffg

Damn, there must be something wrong.

I will retest but I may have to just give up on the UNI/O chips. They were hard enough to get working in the first place and I spent a lot of time fine tuning the driver to get the best reliability - but it still does not seem good enough. It might explain why these chips have not taken the world by storm.

Geoff

__________________
Geoff Graham - http://geoffg.net
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 29 July 2017 at 12:16pm | IP Logged Quote Geoffg

Due to some brilliant detective work by TassyJim which pointed me in the right direction I believe that I have found (and fixed) the stupid bug which stopped writes from working.

Could you guys please give the attached new driver a run: 2017-07-29_121345_UNIO.zip

(fingers crossed )

Geoff
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2255
Posted: 29 July 2017 at 11:27pm | IP Logged Quote TassyJim

Not so fast Geoff!

I can see a big improvement but still no joy writing data.

I am trying this
Quote:
myname$ = "AAAAAAA"
status = UNIO(UNIOpin,
02, &H10, 7, myName$)


I can see the command to write followed by the address
Then there is a '07' byte (length?)followed by 7 'A1' bytes "AAAAAAA" followed by 8 zero bytes. (Filling the write buffer?)

That doesn't agree with my understanding of the datasheet.

This is part of my diagnostic.

Quote:
C:\Users\Jim\Documents\apps\unio09.ols
Resync
10100000 A0
MAK
SAK
10010110 96
NOMAK
SAK
Resync
10100000 A0
MAK
SAK
01101100 6C
MAK
SAK
00000000 00
MAK
SAK
00010000 10
MAK
SAK
00000111 07
MAK
SAK
01000001 41
MAK
SAK
01000001 41
MAK
SAK
01000001 41
MAK
SAK
01000001 41
MAK
SAK
01000001 41
MAK
SAK
01000001 41
MAK
SAK
01000001 41
MAK
SAK
00000000 00
MAK
SAK
00000000 00
MAK
SAK
00000000 00
MAK
SAK
00000000 00
MAK
SAK
00000000 00
MAK
SAK
00000000 00
MAK
SAK
00000000 00
MAK
SAK
00000000 00
NOMAK
NOSAK
00101010 2A
MAK
SAK
Resync

Resync


I will do some more prodding the beast later today.

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2255
Posted: 30 July 2017 at 12:25am | IP Logged Quote TassyJim

Quote:
myname$ = "AAAAAAA"
status = UNIO(UNIOpin,
04)
PRINT "Write all FF: ";status
status = UNIO(UNIOpin,
01, &H10, 24, NewName$)
PRINT "Read Status: ";status
PRINT LEN(NewName$)
NewName$ =
LEFT$(NewName$,24)
PRINT NewName$
status = UNIO(UNIOpin,
02, &H10, 7, myName$)
PRINT "Write string: ";status
status = UNIO(UNIOpin,
01, &H10, 24, NewName$)
PRINT "Read Status: ";status
PRINT LEN(NewName$)
NewName$ =
LEFT$(NewName$,24)
PRINT NewName$



Quote:
> RUN
Write all FF: 1
Read Status: 1
255

Write string: 0
Read Status: 1
7
AAAAAAA
>

Write all memory to FF - OK
Read 24 bytes - End up with a string 255 byte long 24 FF's followed by zeros

Write "AAAAAAA" - gives fail but actual write did occur.

Read 24 bytes - End up with a 7 byte string containing the previously written "AAAAAAA" The leading &h07 and trailing zeros have been trimmed.

The actual bytes starting at &h10 are:
7
65
65
65
65
65
65
65
0
0
0
0
0
0
0
0
255


Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 


<< Prev Page of 5 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1133 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.11