View previous topic :: View next topic |
Author |
Message |
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Sun Oct 11, 2020 10:33 am Post subject: |
|
|
I confirm that Paul said, the secure way is the mini SDcard
You really need it !
Paul works with the "c" command of nextion, I did'nt. I wrote my own bascom library
I use a serial port to send and to receive from the Nextion display
and another to debug
Yes the program firststep display "hello word" then a loop with write "hello word 1" to "hello word 12345678 " with another back color
-----------------
Paul , thank you for the link about nextion tutorial, it seems easier than the help from Nextion
JP _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
Kasch
Joined: 18 Jun 2005 Posts: 48
|
Posted: Sun Oct 11, 2020 11:56 am Post subject: |
|
|
I have the Powerpoint forgotten
sorry for stupid question, but english is not my native language: a simple hello-world-programm will not be displayed without the large sd-card-procedure? right? because font files are missing? thats why are no response from the display with only bascom-programm from JP?
no error-message or any thing else, instead the displaying the nextion animotion? |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Sun Oct 11, 2020 12:10 pm Post subject: |
|
|
To display hello world you need to-
1- create a text box with nextion editor
2- load program from editor to SD Card
3- put SD Card into nextion display so that it loads program created with nextion editor
4- send to "hello world" to text box on display via the serial port |
|
Back to top |
|
|
Kasch
Joined: 18 Jun 2005 Posts: 48
|
Posted: Sun Oct 11, 2020 12:39 pm Post subject: |
|
|
Thank you. It is new and complete different to my other Displays, thats why I am little confused...
which sd-card do you prefer? |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Sun Oct 11, 2020 1:23 pm Post subject: |
|
|
Kasch wrote: | Thank you. It is new and complete different to my other Displays, thats why I am little confused...
which sd-card do you prefer? |
Yes it does all the hard work.
It can also be programmed to do processing
I just used an old mini SD card that was being used with my bascom webserver project
If you put the nextion editor on your computer
you can load the project files I have posted
like bascom it will run it on your computer in a simulator.
Regards Paul |
|
Back to top |
|
|
Kasch
Joined: 18 Jun 2005 Posts: 48
|
Posted: Sun Oct 25, 2020 4:49 pm Post subject: |
|
|
Hello JP,
sorry, but i am very frustrated. in your powerpoint first stap is blue/yellow connected on rx0/tx0..on your bascom example is it tx1/rx1....
how baud-rate is right? how can i find the right baud rate for bascom..
i try and try but after sucessful nextion editor session with sd card updating is over. no "hello world" on Display, only "nexttxt".. |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Mon Oct 26, 2020 12:02 am Post subject: |
|
|
The nextion display is set to 9600 baud at the start.
You have to write code in the nextion editor to change from this.
Regards Paul |
|
Back to top |
|
|
Kasch
Joined: 18 Jun 2005 Posts: 48
|
Posted: Mon Oct 26, 2020 7:12 am Post subject: |
|
|
i have already try with 9600 baud. no sucess.. |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Mon Oct 26, 2020 11:10 am Post subject: |
|
|
hi,
Quote: | sorry, but i am very frustrated. in your powerpoint first stap is blue/yellow connected on rx0/tx0..on your bascom example is it tx1/rx1....
how baud-rate is right? how can i find the right baud rate for bascom.. |
Yes it is right , on the last exemple I use another couple of port because I use 2 serial port
1 for Debug tx0/ rx0 com1
1 for nextion tx1/rx1 com2
on the power-point Idid'nt use debug
Now I use my own card , not a arduino , but It is approx the same wiring
Code: |
$regfile = "m1284pdef.dat" ' "m1284def.dat"
$crystal = 16000000 ' 11052000
$hwstack = 300 '300
$swstack = 250 '200
$framesize = 250 '300
Config Submode = New
Debug On 'Off 'if you debug off you remove all print from USB port
'*****************************************************************
'* CONFIG BUFFERED USART FOR USB *
'*****************************************************************
Config Com1 = 115200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Echo Off
Config Serialin0 = Buffered , Size = 30 'RX from Terminal
Open "COM1:" For Binary As #1
Const Usb = 1
'---serial port-------------------------------------------------------------------------------------------------------------
Const Nex = 2
Config Com2 = 115200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 '19200 modif pour ecran intelligent
Open "COM2:" For Binary As #2
Config Serialin1 = Buffered , Size = 50
Config Serialout1 = Buffered , Size = 30
'M1284------------------------------------
' RXD1= yellow to PD3
' TXD1= Blue to PD2
'*******************************************************************************
$include "declaration_nextion.inc"
$include "sub_macro_nextion#3.inc"
|
I use submode=new
As Paul said you must add bauds=xxxx the speed you choice in the Nextion
then debug and save in the *.tft file
This file must be copy to a mini-sd card and charge it in the display
what can I do more for you ?
JP _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
Kasch
Joined: 18 Jun 2005 Posts: 48
|
Posted: Mon Oct 26, 2020 12:25 pm Post subject: |
|
|
sorry, but my english is very bad.
i have only one chance: connect blue/yellow to rx0/tx0
it looks like the "problem" is on your code. bas and inc work with com2..but i need com1, because i can not connect to tx1/rx1.
can you configurating your code to com1? i believe this is the main propblem by my circuit and your code.
i configurated the nextion display with your tutorial. some baud rates...i skipped the picture chapter, becaus error on compiling. without picture the nextion Editor compiling perfect.
of course i have the compiles tft-file on sd card |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Mon Oct 26, 2020 2:06 pm Post subject: |
|
|
ok
What is your microcontroler ?
could you send me your program and your xxxx.hmI file ?
I have 4 nextion display
I will do your stating program
JP _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
Kasch
Joined: 18 Jun 2005 Posts: 48
|
Posted: Mon Oct 26, 2020 4:03 pm Post subject: |
|
|
it is your 1284p-controller. the same.
I use your code, like below on this thread from 26.10 this was in the firststep-zip.
which html-file do you mean? i have only a tft file from nextion editor |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Mon Oct 26, 2020 4:09 pm Post subject: |
|
|
in the .zip you have a nextion directory with both .HMI and .TFT _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
|