@david_prentice if you are out there, help! I will be forever thankful. I will even name my firstborn after you!
HOLY FLUKE im stuck ! , I modded the mcufriend_shield file , it works! But only if I just use ,say PORTA.
BUT the dude who did the layout of the board i'm programming for, (he doesn't know how to code) and he connected
PC7 as LCD_D0,
PA0 as LCD_D1,
PA1 as LCD_D2,
PA2 as LCD_D3,
PA3 as LCD_D4,
PA4 as LCD_D5,
PA5 as LCD_D6,
PA6 as LCD_D7,
I KNOW ITS INSANE! PA7 is not even used, Wtf right?
I wrote the follwing code, and tested the output , the bitwise seems correct the I/O output is correct , it compiles no errors! but dislplay just doesn't work.
Your setReadDir() macro is wrong.
Your setWriteDir() is wrong but it should work.
Everything else looks ok.
First off. You should set the defines in LCD_ID_readreg sketch. Make sure that your wiring is correct.
When the wiring is verified, make a nice cup of tea. Correcting your two macros will take less than half a biscuit.
thank you for your reply David! the port direction error you caught was a hasty copy paste error,
but it was correctly written in the file!
I ran the LCD_ID_readreg as you suggested and because it almost always worked, I figured out it was a dirty solder on that PC7 pin. The worst type of problem: not broken, but not working.
I am trying to use the 3.5 MCUFriend tft for radio project and having sda scl conflicts. As I dont need the touch screen , is it possible to shift RS CS and RST towards pin A0 A1 and A2 and to free pins A3 and A4. Thanks
LCD_RST pin is A4 on the shield.
I2C SDA pin is A4 on a Uno.
You can only use I2C on a Uno if you make a hardware mod to the Shield.
I only advise this for a MIPI-style controller e.g. ILI9341.
The easiest solution is to change to a MEGA2560 or DUE.
Since you are using a 3.5 inch shield, it is the same size as a MEGA2560.
So it will physically fit in any project.
Personally, I would NEVER buy the current 3.5 inch Mcufriend shield which omits the AMS1117 regulator.
The Uno or Mega can not provide backlight current from the wimpy 3.3V pin.
The Due can provide backlight current because it has a bigger 3.3V regulator.
The MCUFRIEND_kbv library was designed to support Shields plugged into regular Arduino headers.
The Devil might persuade you to hand-wire the Shield to random pins on a random Arduino.
I do not advise it. Especially since Shields mate nicely with Arduino headers.
Most importantly, a Shield has known wiring. A shield is mechanically and electrically robust.
Yes, you can write a SPECIAL to match your random wiring.
I have made several custom Adapters by soldering custom wiring on Protoshields. This is mechanically and electrically robust.
Ok, not wanting to bother you, could you tell me what would be the wiring for a common breakout display, with or without Touch for the MCUFRIEND library?
It's just that I have some breakout displays and would like to enjoy them with your library!
I bended the a4 and joined it with uno reset pin and its working fine now. It sooved the reset pin issue. Now i need audio input at analogue pin. I tried it at a5 which was free of MCUFriend shield but its beiang scl sda it does conflict with i2c. So i need one more analogue free pin. I dont need touch. So how can i get one more analogue pic free preferably a0 or a1 plz.
Rnk:
I bended the a4 and joined it with uno reset pin and its working fine now. It sooved the reset pin issue. Now i need audio input at analogue pin. I tried it at a5 which was free of MCUFriend shield but its beiang scl sda it does conflict with i2c. So i need one more analogue free pin. I dont need touch. So how can i get one more analogue pic free preferably a0 or a1 plz.
Buy a Uno clone with SMD chip. These have two extra Analog pins A6, A7.
Dancopy:
Ok, not wanting to bother you, could you tell me what would be the wiring for a common breakout display, with or without Touch for the MCUFRIEND library?
It's just that I have some breakout displays and would like to enjoy them with your library!
Thanks
Buy a regular Mcufriend Shield. It plugs into the Arduino header sockets.
The shield has the pinout printed on the pcb. If you want to use a breakout display you connect the pins exactly the same as the printed pinout on the shield via level shifters as appropriate.
I just got a nano and in need of extra analog pins i shifted MCUFriend tft sheild on nano. Now lcd is kind of staying wagely lit. Its 9388 as i checked its id on uno but on nano it show no id at all. Wires seems all tight and rechecked. It just serial display id =0x0. kindly suggest.
But it should work on nano.the lcd was showing id
4288 and was working on uno, now it is not working with nano. I checked all the connections. Does it need any change in library to make it work on nano or some register hardware tweeks? Thanks
I do not support any controllers with ID = 4288 (0x10C0)
You do not need any software changes for Nano. Simply wire all the Shield pins to the corresponding 3.3V, 5V, D2-D13 and A0-A4.
In fact I have two Nano Adapter boards. i.e. Arduino headers with a socket for Nano.
I can run regular Shields with Nano-328P, LGT8F328P, NANO-EVERY, NANO-THINARY
I strongly recommend that you buy a proper Uno clone i.e. with Arduino header sockets.
Or buy a Nano Adapter Board. i.e. with Arduino header sockets.
The current Mcufriend Shield design is WRONG. It powers the backlight from the Arduino 3.3V pin which is WRONG. The original Shields had a 3.3V regulator on the display pcb which was powered by the 5V pin.
The Nano 3.3V pin comes from the USB chip. It can not supply much current.
Thanks for your kind response. I fixed the loose connections amd got it back on nano. Now the screen seems working but shows false colors and it doesnt kind of refresh. The sound bar i made on it keep lit and flashes but it nvr go all black when no sound. Thanks again.