Hello All
I am working with 23k256 sram and seem to have found problems with
23k256_sram.jal include  library  procedures while executing
16F877a_23k256.jal sample.

In general all seems to work in principle , however:-
when using the word and dword read/write array pseudo variable
procedures with large data values  (I am afraid I cannot be more
specific) say 0xDDFF  in the case of word or 0xAABBCCDD in the case of
dword, problems seem to occur.

i.e. data seems to be either written to sram incorrectly or
incorrectly read back again using the array pseudo variables. I have
used alternative single byte read calls supplied in sram_23k256.jal to
examine consecutive sram addresses and whereas things appear fine with
most data values with other large data values problems show up. For
example the 16F877a_23k256.jal sample as coded in the library I do not
think gives the expected results.

The use of pseudo-variable arrays was discussed in jallist recently
with some reservations, however Kyle confirmed that their use was now
fully supported by the compiler.
The code in 16F877a_23k256.jal sample as distributed only used
constant values for the pseudo array indexes. I tried using assigned
(word) variables for indexes but it didn't make any difference (no
surprise there!!)

I have downloaded the 23k256_sram.jal  library module supplied in svn/
trunk/include/external/storage/ram assuming that this is the latest
version. I am correct in this or will there be a later version?

I have sample code (which to be honest is really no more than a cut
down version of 16F877a_23k256.jal ) which shows up problems but I am
not sure how to submit this to JALLIB for examination. How does one
post code to JALLIB forum? Does one just include it in the post?

I have examined the code in the pseudo variable procedures in
23k256_sram.jal and it looks good to me. There are some subtle lines
of code that I find confusing but which I do not think can the cause
of the problem.

One of these is the repeated use of :-

var byte addr[4] at address

where address is a word value and we clearly only require access to
the 2 bytes addr[0] and addr[1]. Presumably addr[2] and addr[3] just
point to other non-relevant storage locations but why is this done? I
am obviously missing something here!

Can I also mention that Tutorial p104 says "23k256 uses SPI mode
1,1" ,it dosen't it uses mode 0,0 as borne out by code in
16F877a_23k256.jal.
as provided by the  JAL distribution.

It also appears that the code in the tutorial differs from distributed
16F877a_23k256.jal to which it refers.  This is not necessarily a
problem but the references on p101 and p104 to "const bit
SRAM_23K256_ALWAYS_SET_SPI_MODE = TRUE" are confusing when in fact
this is not the way that the SPI mode for the 23k256 is asserted in
16F877a_23k256.jal and other samples. I just think this is confusing
for the novice and think the reference  would be better removed.

Can I ask members to check these issues and confirm or reject these
problems I experience?

Many Thanks
Dave Paxton




-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to