Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Nextion and Bascom
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM Project Blog
View previous topic :: View next topic  
Author Message
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1198
Location: SYDNEY

australia.gif
PostPosted: Sun Oct 11, 2020 3:44 am    Post subject: Reply with quote

Here is basic instructions.
https://seithan.com/projects/nextion-tutorial/

You need to download the nextion editor https://nextion.tech/nextion-editor/
and learn how to use it to create your graphics.

Regards Paul
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 947
Location: France

france.gif
PostPosted: Sun Oct 11, 2020 8:48 am    Post subject: Reply with quote

hi
did you see the power point file include in the .zip file here ?

https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14537

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 947
Location: France

france.gif
PostPosted: Sun Oct 11, 2020 10:33 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Sun Oct 11, 2020 11:56 am    Post subject: Reply with quote

I have the Powerpoint forgotten Sad

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
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1198
Location: SYDNEY

australia.gif
PostPosted: Sun Oct 11, 2020 12:10 pm    Post subject: Reply with quote

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
View user's profile
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Sun Oct 11, 2020 12:39 pm    Post subject: Reply with quote

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
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1198
Location: SYDNEY

australia.gif
PostPosted: Sun Oct 11, 2020 1:23 pm    Post subject: Reply with quote

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
View user's profile
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Sun Oct 25, 2020 4:49 pm    Post subject: Reply with quote

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
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1198
Location: SYDNEY

australia.gif
PostPosted: Mon Oct 26, 2020 12:02 am    Post subject: Reply with quote

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
View user's profile
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Mon Oct 26, 2020 7:12 am    Post subject: Reply with quote

i have already try with 9600 baud. no sucess..
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 947
Location: France

france.gif
PostPosted: Mon Oct 26, 2020 11:10 am    Post subject: Reply with quote

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 Crying or Very sad

_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Mon Oct 26, 2020 12:25 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 947
Location: France

france.gif
PostPosted: Mon Oct 26, 2020 2:06 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
Kasch

Bascom Member



Joined: 18 Jun 2005
Posts: 47

PostPosted: Mon Oct 26, 2020 4:03 pm    Post subject: Reply with quote

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 Sad
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 947
Location: France

france.gif
PostPosted: Mon Oct 26, 2020 4:09 pm    Post subject: Reply with quote

in the .zip you have a nextion directory with both .HMI and .TFT
_________________
pleasure to learn, to teach, to create
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM Project Blog All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum