Re: W8TEE TFT/VFO DDS adapter

Jack Purdum <econjack@...>
 

Yes, it's trying to "point" to the offending source line for the error. This message is saying that it cannot find the write_16() function. After some searching, I found that it is a macro, not a function:

#define write_16(x)   { PORTA = (x) >> 8; PORTC = x; }

For some reason, this macro is not being read into the program, but is still being called. It's being held out because the USING_16BIT_BUS symbolic constant is being set to zero. Because the missing macro is messing around with ports, I'm assuming its doing that to improve the speed of the library. Just for grins (and I don't expect this to work), copy the line above to a spot immediately after all of the #include preprocessor directives and tell me what happens to the error message.

Jack, W8TEE



From: Michael Hagen <motdog@...>
To: BITX20@groups.io
Sent: Sunday, June 18, 2017 2:40 PM
Subject: Re: [BITX20] W8TEE TFT/VFO DDS adapter

As suggested I am trying to get MCUFriend grafixtest to run.
After hard coding to use 16 bit I get this error.....
Is the Carrot underneath just a marker for pointing out the error?

C:\Users\Michael Hagen\Documents\Arduino\libraries\MCUFRIEND_kbv-master\MCUFRIEND_kbv.cpp:573:23: error: 'write_16' was not declared in this scope

         write_16(color);        //we could just do the strobe

                       ^
Strange, "^" I did not put it there.

Mike


On 6/18/2017 11:12 AM, Jack Purdum via Groups.Io wrote:
This error:

"error: 'write_16' was not declared in this scope"

suggests that in your code you used:

#define write_16

which probably needs to be written:

#define WRITE_16

since most C programmers write symbolic constants in upper case letters. C is case sensitive so WRITE_16 and  write_16 are different symbolic constants.

Jack, W8TEE

From: Michael Hagen <motdog@...>
To: BITX20@groups.io
Sent: Sunday, June 18, 2017 1:27 PM
Subject: Re: [BITX20] W8TEE TFT/VFO DDS adapter

Thanks,

I added the 16Bit define in C file.

now get error in Jack's code?

"error: 'write_16' was not declared in this scope"

Maybe there needs to be a ref to an external something?


I think my correct display type is "ILI9481"  Which I have seen 0XDBDB
returned in a test?

I looked at Rinky Dink documents.  I looks like it uses the Data d0-d15
on the top half of the right side double connector.

D37 and up.  The top pins are 5V.  Then d39 & d41 on the right side for
Wr and Rst.

d36 & 38 on the other side for RS and CS.  They say that's all on the
Mega they use on that connector?



On 6/18/2017 9:48 AM, Vince Vielhaber wrote:
>
> I haven't looked at the other responses yet, so I'm assuming you got
> that info.  If not, I think you'd need to add
>
> #define USES_16BIT_BUS
>
> at the top of libraries/MCUFRIEND_kbv/MCUFRIEND_kbv.cpp
>
> Did you try 0x8357 as the g_identifier?  I see that it's in the
> library so yours may just not be getting accessed correctly.
>
> Vince.
>
>
>
> On 06/18/2017 09:57 AM, Michael Hagen wrote:
>> I am looking for a file in MCUfriend?
>>
>> A header or C file?
>>
>> Is there a #define somewhere to use Mega 2560 Pins.
>>
>> Yes, I have it plugged directly to a Mega, so I would need that option?
>>
>>
>> I tried changing ID in Jacks new code.  Still nothing.  Default 0xD3D3.
>>
>>
>> Thanks, I don't know where to look?
>>
>> Mike,WA6ISP
>>
>>
>> On 6/18/2017 4:34 AM, Laurent CHABERT wrote:
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> *De :* BITX20@groups.io <BITX20@groups.io> de la part de Vince
>>> Vielhaber <vev@...>
>>> *Envoyé :* dimanche 18 juin 2017 05:00
>>> *À :* BITX20@groups.io
>>> *Objet :* Re: [BITX20] W8TEE TFT/VFO DDS adapter
>>>
>>>
>>> Did you try changing that line of code in the MCUFriend driver that
>>> Jack
>>> mentioned the other day?  That one's using the mega pins as opposed to
>>> the standard pins.
>>>
>>> Vince.
>>>
>>>
>>>
>>> On 06/17/2017 01:09 PM, Michael Hagen wrote:
>>> > Yes Rinky Dink works but I can't get any MCU Friend to work.  I spent
>>> > most of the day playing with it.
>>> >
>>> > My TFT is directly plugged into a Mega 2560.  Its pinouts fit like a
>>> > shield over the top of the 2560.
>>> >
>>> > Any hints to give me?  I don't know why  Rinky Dink works.
>>> >
>>> > I have run the ID program in MCUFriend, no ID.  I know that the
>>> package
>>> > says HX8357B for Driver?
>>> >
>>> > Mike, WA6ISP
>>> >
>>> >
>>> > On 6/16/2017 4:58 PM, Vince Vielhaber wrote:
>>> >> If the UTFT library works (the one from Rinky Dink) then the
>>> >> MCUFriend_kbv library should once you find the right parameters.
>>> UTFT
>>> >> is slow and a memory pig.
>>> >>
>>> >> Vince.
>>> >>
>>> >>
>>> >>
>>> >> On 06/16/2017 07:40 PM, Michael Hagen wrote:
>>> >>> Bought 2 of these displays.  Less than $8.  No Touch Screen. 36
>>> Pins,
>>> >>> not 40.
>>> >>> Uses 9481 Controller, package says Driver: HX8357B?
>>> >>>
>>> >>> Work fine but not so far with your recommended library (Friend?).
>>> >>> A library at Rinkey Dink Electronics works?
>>> >>>
>>> >>> Parallel transfer, not serial.
>>> >>> I did not look at whether you used serial or parallel?
>>> >>>
>>> >>> Mike, WA6ISP
>>> >>>
>>> https://www.aliexpress.com/item/Free-shipping-3-2-inch-TFT-LCD-screen-module-Ultra-HD-320X480-for-Arduino-MEGA-2560/32609807497.html?spm=2114.13010608.0.0.7MCWtA
>>>
>>> >>>
>>> >>>
>>> >>>
>>> >>
>>> >
>>> >
>>> >
>>> >
>>>
>>> --
>>>    Michigan VHF Corp.  http://www.nobucks.net/ http://www.CDupe.com/
>>>                            http://www.metalworkingfun.com
>>>
>>>
>>>
>>
>>
>






Virus-free. www.avast.com



Join BITX20@groups.io to automatically receive all group messages.