Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

Eeprom org

:: EPE Chat Zone ≠:: ≠Radio Bygones Message Board :: » EPE Forum Archives 2005-2006 » Archive through 07 June, 2006 » Eeprom org « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 415
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 27 May, 2006 - 06:00 pm:   Edit Post Delete Post Print Post

Hi all
Can anyone please confirm the starting point of the EEPROM address for the 16f874
Is it @ ORG 2100 the same as the 16F84A?


Thanks
Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 416
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 27 May, 2006 - 07:17 pm:   Edit Post Delete Post Print Post

To answer my own question
I have recently started to use MPLAB IDE .
This is taking me some time to get the hang of.!!!!!!
Add finding things very confusing at times.
And this is just one of them times!

Never using the DATA EEPROM before, I look at a program that did in MPLAB and after seeing the starting address at ORG 2100 this is what I used in my program too.

Only to find it wasnít working
Because I forgot about the radix option and the fact that by default MPLAM is hex.
So the starting address is Hí2100í not 2100

This to me is wrong as decimal should always be decimal unless stated otherwise
and can become confusing

To me Tk3 is spot on as its default is decimal, and I just cant see why anyone would wont to use any thing else, well unless they had to use a asm that had been written with a different radix.

Paul




.

(Message edited by paul_goodson on 27 May, 2006)
Top of pagePrevious messageNext messageBottom of page Link to this message

Mikehibbett
Frequent Contributor
Username: Mikehibbett

Post Number: 449
Registered: 04-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 27 May, 2006 - 09:23 pm:   Edit Post Delete Post Print Post

Ah, that one still gets me Paul.

I use gpasm and am forever tripping over radii issues.

It happens in C too :o)

Mike.
-----
www.drivesentinel.co.uk - Home build GPS Speed Camera Detectors
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 352
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 01:46 am:   Edit Post Delete Post Print Post

Thank you Paul for your support of TK3. I like it & think I did a pretty good job of it though all its incarnations :-) I'm talking with someone else about adding further facilities, incl USB

J
Top of pagePrevious messageNext messageBottom of page Link to this message

Mr_bwts
Regular Contributor
Username: Mr_bwts

Post Number: 21
Registered: 08-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 02:13 pm:   Edit Post Delete Post Print Post

now your talking john

usb on TK3 would be great

i have been using TK3 for a couple of years and really like it

although i must admit i really like MPLAB too

(Message edited by mr_bwts on 28 May, 2006)
"more with less" - R B Fuller
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 418
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 03:00 pm:   Edit Post Delete Post Print Post

Despite now having the right address..
I am struggling to get data in to the EEPROM at the start of the program.

I think its something to do with not knowing haw to use ORGs properly. !!!!!!!!!!!!!!!

This is haw I first done it in MPLAB and it worked on their simulator

ORG H'2100'
DE 'C', 'A', 'T', ' '

ORG 0
GOTO 5
ORG 4
GOTO 5
ORG 5

Then I tried it on TK3 and I got an error message saying

ďCURRENT ADDRESS OF XXXX >=NEW ORG VALUE 4Ē
I then put the ORG Hí2100í along with the DE line under ORG 5 I donít think it is correct way but it loaded with no errors but also no data in EEPROM as well.

Any help most welcome
Thanks
Paul

(Message edited by paul_goodson on 28 May, 2006)
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 419
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 03:10 pm:   Edit Post Delete Post Print Post

That's Great news John for all Tk3 users.
I wish you the best of luck with it.

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Zeitghost
Frequent Contributor
Username: Zeitghost

Post Number: 192
Registered: 01-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 04:16 pm:   Edit Post Delete Post Print Post

Never used the EEPROM, but doesn't your program have to write to it and read from it with appropriate routines?

It typically takes about 10ms to write data to an external IIC EEPROM, is the internal one different?
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 420
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 04:39 pm:   Edit Post Delete Post Print Post

Thanks Zeitghost
Yes you are correct that you can normal read and write to it..
but you can also set the data at the start of the program, or should I say other people can!!!!!!!!!!!!
.
This could just be used as extra storage space if you wonted
.
Its the first time I have played with it and I am using the DATA EEPROM as a bank to keep my characters in to send to a LCD display rather than use character tables.

You should be able to select the address in the program and then add the data like I show in my other post.
ďCATĒ should have gone into the first three EEPROM bites.0 to 3
Well it did in MPLAB
ORG H'2100'
DE 'c', 'A', 'T', ' '

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Obiwan
Frequent Contributor
Username: Obiwan

Post Number: 507
Registered: 12-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 05:39 pm:   Edit Post Delete Post Print Post

You can set the default number base in mplab. I forget exactly where it is, but you can find it fairly easy.

If you have trouble, let me know and I'll locate it for you.

But as I remember, you'll have to set it for each project, it will always default to HEX if I remember correctly.

I like to specify everything, I don't want to leave ANYTHING to chance.
Do Not Hit The Fly That Lands On The Tigers Head.
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 421
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 07:12 pm:   Edit Post Delete Post Print Post

Thanks Obiwan
Thatís handy to know.
But the real problem Iím having is with getting the same code to work on tk3,

As I have already got it running on MPLAB simulator.

Take Care
Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 282
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 07:55 pm:   Edit Post Delete Post Print Post

Paul I think there was something about loading eeprom data seperatly to the main prog using tk3! ! Im wracking my brain, but i think u have to load a eeprom message seperatly:-(

(Message edited by magnum4 on 28 May, 2006)
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 283
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 08:07 pm:   Edit Post Delete Post Print Post

Ok Paul I never used it but look in the assembly notes on the TK3 main screen, John explains it there.
HTH
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 422
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 08:12 pm:   Edit Post Delete Post Print Post

Hi Jim
Thanks for that
I was just going back on part 3 v2 tutorial June 2003 page 41
on embedded EEPRON-DATA and it look as if you could do it from the main asm.
Strange!

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 284
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 08:14 pm:   Edit Post Delete Post Print Post

Yes you can read the notes.
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 423
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 28 May, 2006 - 10:35 pm:   Edit Post Delete Post Print Post

Yes thanks Jim
I already had
Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 354
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 01:18 am:   Edit Post Delete Post Print Post

TK3 requires the use of ORGs in the correct numerical order before the commands affected by them. EEPROM is the last set of data and so the ORG indicating it must be immediately prior to the eeprom values themselves, indicated by DE if preferred. Read the notes in the current version as on site.

TK3 has allowed data eeprom values to be compiled as part of the hex code for a long while, along with DE, but there are a few restrictions about the use of DE generally elsewhere in the ASM.

The ORG required to indicate eeprom values can change with the PIC type, see Microchip's datasheets.

J
Top of pagePrevious messageNext messageBottom of page Link to this message

Zeitghost
Frequent Contributor
Username: Zeitghost

Post Number: 193
Registered: 01-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 12:19 pm:   Edit Post Delete Post Print Post

So the EEPROM can be programmed with default values at the same time as the Flash?

Neat.
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 424
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 02:07 pm:   Edit Post Delete Post Print Post

Yes Zeitghost you can.
But I canít make head nor tail with it on TK3, despite reading through the notes.

but give me a chance as Iv only be trying it for "2 days"and its started to become more like an endurance test.

So back to the drawing board for me,
If you dont succeed once try try try again!!!!!

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Zeitghost
Frequent Contributor
Username: Zeitghost

Post Number: 194
Registered: 01-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 02:14 pm:   Edit Post Delete Post Print Post

I remember when I was trying to get my head around a linker called CLOB for the General Automation minicomputer... that took 3 days... :o(

It was called CLOB which stood for Core Load Overlay Builder. To fit more than about 14k of program into a partition, you had to use overlays... a nightmare that went away a long long time ago now... running 3 terminals in 48k of memory, such a joy.
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 426
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 07:42 pm:   Edit Post Delete Post Print Post

Hi Zeitghost
I donít think my problems is as complicated as ďCLOBĒ
Just maybe a miss understanding on my part!!! Or something I just canít grasp.


This may also interest you
page 3 sec 2.2

http://ww1.microchip.com/downloads/en/DeviceDoc/39025f.pdf

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 287
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 07:59 pm:   Edit Post Delete Post Print Post

Hi Paul,
Just reading the tut section u indicated, It does not seem clear, but it does say the asm requires the org statement at the end? I wonder did you try the de first then the org H'2100?
Im probably way off the mark.:-(
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 288
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 08:16 pm:   Edit Post Delete Post Print Post

Sorry Paul re reading the notes Im worng again:-(

Since the introduction of V1.3, TK3 can now handle Data Statements embodied in the source code as strings of values separated by commas, as in the following examples, all prefixed by DE following the ORG H'2100' statement (EEPROM address start). All the usual numerical formats are permitted, and the data is placed at consecutive addresses commencing from the ORG value stated. The range is from H'2100' to the maximum that the PIC permits.

ORG H'2100'
DE 10, 9, 8 ,7 ,6 ,5, 4, 3, 2, 1, 0
DE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
DE $A, $B, $C, $FF
DE H'A', H'B', H'C', H'FF'
DE 'A', 'B', 'c'
DE %00000001, %00000011
DE B'00000001', B'00000011'
DE HIGH 12345, LOW 12345
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 427
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 09:01 pm:   Edit Post Delete Post Print Post

Hi Jim

Thatís exactly haw I thought it should work and does with MSLAB
After reading the notes below that in the assembly part of the tk3 main screen
about the "ORG" is the part that got me!!!!!!

Starting off with something about if a ORG address value is found between H2000 & H2008 est. est.!!!!!!!!

as I said in an early posting

RE
I think its something to do with not knowing haw to use ORGs properly. !!!!!!!!!!!!!!!

I should of maybe said I donít now how to use them properly within TK3

Sorry I just cant grasp it

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 289
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 10:28 pm:   Edit Post Delete Post Print Post

Ok Paul!!
Two of us:-(
Im working on something else but tried to include some eprom data. Will not work:-(
The error seems to be implying that im gone above the memory available? So tk sets org back to 0?
Im using a 628, Which as far as i can make out is the same as the 84, I.E. h'2100'.
The lower Addresses are reserved, thats why tk stops, H'2008' etc are for id number etc:-(
Now you have me thinking hard:-) Prob an easy answere:-0

(Message edited by magnum4 on 29 May, 2006)
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 290
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 10:33 pm:   Edit Post Delete Post Print Post

Org is I think short for origon, or where to place the code, Tasm required the first 4 addresses so we usually start at location 5:-) But orig is fine if not using tasm, im nearly sure:-/ I think you could use org100 as long as you had enough space to fit prog:-)

(Message edited by magnum4 on 29 May, 2006)
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 291
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 10:58 pm:   Edit Post Delete Post Print Post

Ok,
I have loaded tut38, changed the incl file and it runs fine( Clock) I Include the org H'2100' followed by DE 'a' 'b' 'c'.
I get an error saying
0-63 current address of 8451>=new org value of 0.!
Looks like ive gone over the 2k limit of the 628?
Wierd:-(
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 428
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 11:26 pm:   Edit Post Delete Post Print Post

Thanks for your time Jim
If you look in the list file does it also show 2 addresses with the same no.

0052 8448 4200 0000 00000000 00000000 45 DE 'a', 'A', 'T', ' '
0053 8448 4200 0000 00000000 00000000 Expanded DATA DE 'a'
0054 8449 4202 0041 00000000 01000001 Expanded DATA 'A'
0055 8450 4204 0054 00000000 01010100 Expanded DATA 'T'
0056 8451 4206 0020 00000000 00100000 Expanded DATA ' '

something like this

oh it is normal for the address to be double
I.e. Hex 2100 shows as hex 4200

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 292
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 11:33 pm:   Edit Post Delete Post Print Post

Not quite the same Paul,
This is what i get. I know about the double value.

0189 8448 4200 0000 00000000 00000000 23 DE 'A', 'B', 'c'
0190 8448 4200 0000 00000000 00000000 Expanded DATA DE 'A'
0191 8449 4202 0042 00000000 01000010 Expanded DATA 'B'
0192 8450 4204 0063 00000000 01100011 Expanded DATA 'c'

Funny I think the first reference is a line number? But its out by a mile?
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 293
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 11:40 pm:   Edit Post Delete Post Print Post

Thats after the incl file> Thats why the number is high:-)
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 294
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 29 May, 2006 - 11:46 pm:   Edit Post Delete Post Print Post

Why Are you getting 5 lines for 3 letters, im getting 4? I think we have the wrong eeprom address maybe?
Ah you have a space, silly me:-(

(Message edited by magnum4 on 29 May, 2006)
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 356
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 01:44 am:   Edit Post Delete Post Print Post

Zeitghost, yes, as I often do

Paul, email me at home & I'll send you an example. Someone stick a note in this thread if you want an example here

Magnum4, ORG first then the values, prefixed by DE if you want. The word you want is "origin" !

J
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 295
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 09:02 am:   Edit Post Delete Post Print Post

Hi John.
Yes meand origin,sorry.

This is what i did, but it still does not work,an example would be nice thanks.

LOOP EQU H'20' ; loop counter 1 - general
CLKCNT EQU H'21' ; pre-counter for CLOCK
CLKSEC EQU H'22' ; CLOCK main counter - secs
CLKMIN EQU H'23' ; CLOCK - mins
CLKHRS EQU H'24' ; CLOCK - hours
STORE1 EQU H'25' ; general store 1
STORE2 EQU H'26' ; general store 2
RSLINE EQU H'27' ; RS line flag for LCD
LOOPA EQU H'28' ; loop counter for LCD


ORG h'2100'
DE 'A', 'B', 'c'



ORG 0 ; Reset Vector address
GOTO 5 ; go to PIC address location 5
ORG 4 ; Interrupt Vector address
GOTO 5 ; go to PIC address location 5
ORG 5 ; Start of Program Memory at location 5
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 429
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 09:39 am:   Edit Post Delete Post Print Post

hi Jim
Re
I think we have the wrong DATA EEPROM address maybe?


my DATA EEPROM address is correct H2100
but not sure about your 628.

Thanks John
email on its way
Please put us out of are misery
Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 357
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 10:05 am:   Edit Post Delete Post Print Post

Hi all, here's an extract from the prog I'm now working on. Any questions please ask.

I have used ">" here to indicate line indents so the assembler prog knows which column to allocate statements - essential for such indents to exist - at least 1 space deep, visual 8 or so spaces (use tab key to set them if preferred).

Note I'm using TASM dialect here with forms such as "$" & "%", normal MPASM forms are quite acceptable.

As I feared looking at the pre-post the CZ prog strips spaces from texts, hope it's still clear.

J

; MASTERMSG270A 29MAY06

; PIC16F628, INTERNAL OSC, WDT OFF, POR ON, INTRC 100

; ******* GENERAL HEADERS

#DEFINE BANK0 BCF $03,5
#DEFINE BANK1 BSF $03,5

> List P = PIC16F628, R=DEC;
> __CONFIG h'3F30' ; config value

> include P16F628.inc ; all the required general equates

; **** AUTOMATIC EQUATES SPECIFYING BLOCK

> CBLOCK
STORE1
[lots more regs here]
ANIMRATE
ANIMADDRESS
ANIMSTORE ; storage block, extends to $6F
> ENDC
; do not add REGs after ANIMSTORE

; ****** OTHER SPECIFIC EQUATES

PROMVAL EQU $70 ; in both pages
SPBRG EQU $99 ; not in INC file for some odd reason. Bank 1

; **************

> ORG 0
> goto GIEOFF
> ORG 4 ; Interrupt vector address
> goto GIEOFF
> ORG 5 ; Start of program memory

GIEOFF: BCF INTCON,GIE ; turn off global interrupts
> BTFSC INTCON,GIE
> goto GIEOFF
> goto START

; ***** TABLES ETC NEEDING TO BE WITHIN 1st 256 bytes ****

TABLE: movf CHARACTER,W
> andlw 127
> addwf PCL,F

> include lcdmtx2.inc"

; ******************* START OF MAIN PROG

START : clrf PORTA
> clrf PORTB

; ***********
; MAIN BODY OF CODE GOES HERE
; ***********

CLEARFLAGS: movlw 5
> call TXBYTE
> goto COL0A

; ****** END OF MAIN CODE **
; ****** START OF DATA EEPROM SECTION ****

> ORG $2100 ; data eeprom values

> DE 35, 20 ; (qty/scroll rate)
> DE 'M','I','N','D',' ','T','H','E',' '
> DE 'C','A','R',' '
> DE %10000000
> DE %10001100
> DE %10011100
> DE %10011010
> DE %10011101
; etc

> END
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 430
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 01:14 pm:   Edit Post Delete Post Print Post

Hi all
Thanks John
The first thing I noted was obviously the position of the ORG at the very bottom of the asm just before End.
Just by moving my commands to that new position TK3 loading it with no errors
The only thing is that the first byte is not recognised ( C ) and treats it as 0 I think!
it shows up as something like this on my LCD
u
l


But Im getting closer



ORG H'2100'
DE 'C','A', 'T', ' '

END

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 431
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 01:14 pm:   Edit Post Delete Post Print Post

Hi all
Thanks John
The first thing I noted was obviously the position of the ORG at the very bottom of the asm just before End.
Just by moving my commands to that new position TK3 loading it with no errors
The only thing is that the first byte is not recognised ( C ) and treats it as 0 I think!
it shows up as something like this on my LCD
u
l


But Im getting closer



ORG H'2100'
DE 'C','A', 'T', ' '

END

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 432
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 02:20 pm:   Edit Post Delete Post Print Post

Hi Again
After playing around a bit more with it
If I erase all memory and change the ORG to say
H 2120 and re-load the program
The same data is being called to the LCD which shouldnít be at that address.
As Iím calling if from byte 0 through the read routine!!!!!!

and still cant get the C to show

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 358
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 07:19 pm:   Edit Post Delete Post Print Post

Paul, perhaps your LCD has a different character set to those often used, and needs data converting to suit. Send me your ASM & HEX files (zipped) to my home & I'll take a look at them. Also have a look at the List file TK3 produces and see what characters from eeprom are shown there, also examine the hex file through TK3's View Hex and Hex Decode in the Programming area on the main screen and see what values are shown there. Additionally, examine the programmed PIC's eeprom through TK3's Read Eeprom Message option and see what shows there.

J
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 296
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 07:26 pm:   Edit Post Delete Post Print Post

Hi Guys,
Yes I loose the first character in each line, If i put in a space all the letters come out ok as in line 3?

ORG H'2110'


DE 'A', 'B','c'
de 'a','n','o','t','h','e','r'
DE ' ','l','i','n','e'

end ; final line
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 297
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 07:38 pm:   Edit Post Delete Post Print Post

Ok Paul,
If you insert a comma after the DE it seems to cure it. I.E. De,. It also means you dont need to include a space

Does for me anyway.
HTH

(Message edited by magnum4 on 30 May, 2006)
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 433
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 30 May, 2006 - 11:40 pm:   Edit Post Delete Post Print Post

Yes JIM it now shows the C but only as it has pushed the line along and I still have a funny character in the first position. As it is reading this as zero.
After checking it out with tk3 simulator its taken that first position as 0 regardless!!!!!!!!
Donít forget Iím using the 16F874

Hi John Im sure itís not the LCD. (Agena AA16206)

Also as I said before if I set the org to say 2150 and read the data back from byte address 0 on, to byte 10 from the read routine the same data is sent to the LCD
Strange as no set data has been placed there!!!!!! And I know I have erased all memory first


Has anyone got a large hammer at hand

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 359
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 31 May, 2006 - 12:12 am:   Edit Post Delete Post Print Post

Paul, just checking my email box - nothing from you yet. I'd prefer not to comment further until I've examined your files, and further chat now seems pointless until I do

But when you say in your last post "read back", in what sense "read back", via TR3's message read? through the PIC's screen? read hex file from PIC? through readback to ASM file from PIC?? Too ambiguous a statement !!

J
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 360
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 31 May, 2006 - 11:27 am:   Edit Post Delete Post Print Post

Paul, as I've pointed out privately, you've got an unwanted comma after "DE," in the ASM file you've sent me but which I dont see here in your examples. That would account for a lot. Magnum4, I'm lost about why you suggested it !

I'll run your code when I get the chance Paul.

J
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 435
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 31 May, 2006 - 12:01 pm:   Edit Post Delete Post Print Post

Hi John
Sorry I have just put the comma in and forgot to take it out after testing out Jim's idea.
So does that mean Jim still has a problem with it too.!!!!!!

I also replied to it on a later post, saying it had made no difference as such.
It just pushed every thing along one place on the LCD and left that funny character in the first position, but then show the C in the second position and so on..

I just wondered Jim
Did you actually try it out on an LCD or did you just read it from the List file?

Thanks you all for help you are given me


Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 436
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 31 May, 2006 - 12:16 pm:   Edit Post Delete Post Print Post

sorry I posted this to the wrong thread
it should have gone before the last post I sent in

Hi John

In an earlier thread I said

ďThe same data is being called to the LCD which shouldnít be at that address.
As Iím calling if from byte 0 through the read routine!!!!!! ď

Sorry John
What I meant by that is that I am using the EEPROM DATA READ routine in my asm to read the bytes of data back from the EEPROM Memory to then send to a LCD send routine.

I obviously made a big mistake somewhere but I just canít find it.

I will Email the file over to you
Try not to embarrass me too much!!!!!!!!!
Many Thanks
Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

Magnum4
Frequent Contributor
Username: Magnum4

Post Number: 298
Registered: 04-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 31 May, 2006 - 12:22 pm:   Edit Post Delete Post Print Post

Hi Guys,
It seemed to solve it John. I know now it didnt.

Paul I only read the eeprom memory in tk3, so no I didnt try to read in on the LCD.

The first character is missing on each line after the DE statement? What is there is expanded DATA DE 'A' as below from the list file??

0364 0 0000 0000 158 ORG H'2100'
0365 0 0000 0000 159 DE 'a','b','c'
0366 8448 4200 0000 00000000 00000000 Expanded DATA DE 'a'
0367 8449 4202 0062 00000000 01100010 Expanded DATA 'b'
0368 8450 4204 0063 00000000 01100011 Expanded DATA 'c'
0369 0 0000 0000 160 de 'a','n','o','t','h','e','r'
0370 8451 4206 0000 00000000 00000000 Expanded DATA de 'a'
0371 8452 4208 006E 00000000 01101110 Expanded DATA 'n'
0372 8453 420A 006F 00000000 01101111 Expanded DATA 'o'
0373 8454 420C 0074 00000000 01110100 Expanded DATA 't'
0374 8455 420E 0068 00000000 01101000 Expanded DATA 'h'
0375 8456 4210 0065 00000000 01100101 Expanded DATA 'e'
0376 8457 4212 0072 00000000 01110010 Expanded DATA 'r'
0377 0 0000 0000 161 DE 'l','i','n','e'
0378 8458 4214 0000 00000000 00000000 Expanded DATA DE 'l'
0379 8459 4216 0069 00000000 01101001 Expanded DATA 'i'
0380 8460 4218 006E 00000000 01101110 Expanded DATA 'n'
0381 8461 421A 0065 00000000 01100101 Expanded DATA 'e'
0382 0 0000 0000 162
0383 0 0000 0000 163
Regards,
Jim
Top of pagePrevious messageNext messageBottom of page Link to this message

Paul_goodson
Frequent Contributor
Username: Paul_goodson

Post Number: 439
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 31 May, 2006 - 01:01 pm:   Edit Post Delete Post Print Post

Hi Jim
Thanks
Maybe that is haw it is meant to be displayed. by TK3
0366 8448 4200 0000 00000000 00000000 Expanded DATA DE 'a'
0367 8449 4202 0062 00000000 01100010 Expanded DATA 'b'
0368 8450 4204 0063 00000000 01100011 Expanded DATA 'c'


Oh and if so I have a big problem elsewhere

Paul
Top of pagePrevious messageNext messageBottom of page Link to this message

John_becker
:::: Super User ::::
Username: John_becker

Post Number: 362
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 31 May, 2006 - 07:09 pm:   Edit Post Delete Post Print Post

Well, I've looked at Paul's files and advised him, but couldnt test the code on an F87x as TK3 board is dead and I've not fixed it yet - am using TK2 board, for small PICs only. So had to modify Paul's prog to suit an F84 - no eeprom problems.

We'll let you know of further developments.

J

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page