ROM string values

General questions about Firewing...

ROM string values

Postby Coccoliso » Tue Oct 24, 2017 11:32 am

Hi at all!,

here http://www.firewing.info/forum/viewtopic.php?f=12&t=200&p=1140&hilit=tablat#p1140 I've already put the problem that the PIC24 has worked, now for the core &H0020 the routine does not work and think I miss something.

Code: Select all
private Function ROMReadByte(cAddr As ushort, idx as ushort) As Byte
   #if _core = &H0018
   dim addr as uinteger = cAddr + idx
   asm   
   mov.w    addr, w13
   mov.w    addr + 2, W0
   mov.w    WREG, _TBLPAG
   tblrdl.b [w13++], w0
   mov.b    WREG, ROMReadByte
   end asm     
   #elseif _core = &H0012
   save(TABLEPTR)   
   TABLEPTR = cAddr + idx
   asm
   TBLRD *+
   movff TABLAT, ROMReadByte 
   end asm       
   restore
   #else 
   addr1 = cAddr + index
   ReadByte = *(baddr1)
   #endif
End Function 


Can anyone give me a hand?
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: ROM string values

Postby David John Barker » Tue Oct 24, 2017 11:57 am

For 32 bit, take a look at the ROM library under

\Library\MCU32\ROM

Which should give you some pointers. It's a long time since I looked at that myself...
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: ROM string values

Postby Coccoliso » Tue Oct 24, 2017 2:27 pm

Hi David,

I understand, using the PIC32 I had to put a little order in my UserLibrary by putting the right things in the right place.
The \ROM folder in the \Library\MCU32\ folder is missing ( my location is "C:\ProgramData\Mecanique\Firewing\Library\MCU32\").
I also downloaded the latest version from the site (the one I use though the last dated December 15, 2014) and the ROM.bas module is not there for the MCU32 version.
Can you take a look at the distribution?
Thank you David
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: ROM string values

Postby David John Barker » Tue Oct 24, 2017 2:48 pm

I've attached my MCU32 library sub-folder, which should help anyone looking...
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: ROM string values

Postby Coccoliso » Tue Oct 24, 2017 3:16 pm

Sorry David where did you posted it?
I can not find it.
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: ROM string values

Postby David John Barker » Tue Oct 24, 2017 3:55 pm

Mmmm, it didn't upload - leave it with me...
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: ROM string values

Postby David John Barker » Tue Oct 24, 2017 4:06 pm

Try here
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: ROM string values

Postby David John Barker » Tue Oct 24, 2017 4:09 pm

sorry, it's not allowing me to do this. Don't know why and havn't the time to investigate. Email me and I'll send it to you...
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: ROM string values

Postby Coccoliso » Tue Oct 24, 2017 10:04 pm

Hi David,

:D All resolved :D ..
the problem is the 16bit resolution instead of 32Bit of the variable that had to pass the address.
The LCD font module from which I had taken it has rightly used an UInteger for that value.

Thanks anyway, David.
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x