Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

FT800
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Wed Mar 11, 2015 1:55 pm    Post subject: Reply with quote

Button start_stop work good, but also work when I prees dial gauge, tried it ?
other buttons work normally in this configuration .
the problem is of a different type
Back to top
View user's profile
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Wed Mar 11, 2015 7:40 pm    Post subject: Reply with quote

Now I resolved problem:)
Always before every created element on display have to be TAG xx even before text , number etc.
now work all correctly

Thanks for helps
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Wed Mar 11, 2015 11:34 pm    Post subject: Reply with quote

mototest2

I see now what you mean with the Dial.

The use of TAG can cause problems if not used correctly, if you don't assign a TAG
to an Object it will be assigned the previous TAG used.

When you assign(a TAG) and draw the Start/Stop button and then draw
the Dial without assigning a TAG, the Dial will have the same TAG value
as the Start/Stop button meaning if you press on the Dial you will get the
same value as the Start/Stop button (like 2 buttons on the keyboard having
the same ASC value).

Some solutions:
Possibly use a constant for the unused Objects like constant not_used = 1
TAG not_used
OR
use TagMask 0 to disable the Tag Mask Buffer so no TAG writes are made.

BTW is this an Automotive project ?, is the dial RPM (possibly Diesel engine if the dial is only 2000).

_________________
Peter
Back to top
View user's profile
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Thu Mar 12, 2015 8:26 am    Post subject: Reply with quote

Now I understand how it use Smile
Yes, this is automotive project, and gauge is for reading RMP from diesel pump
Thanks for help

Bob.
Back to top
View user's profile
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Thu Mar 12, 2015 8:58 am    Post subject: Reply with quote

I have two qeestion yet for you, can I read coordinates x,y for pressed point on display ? because this is easy for deploy graphic elements on the display
and second question, in demo4 is screensaver , it don't work correctly with my board, I don't see bitmap "Lenaraw.bin" I see only noise in the square, where is problem ?
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Thu Mar 12, 2015 11:30 am    Post subject: Reply with quote

mototest2

Quote:
can I read coordinates x,y for pressed point on display ? because this is easy for deploy graphic elements on the display

Yes, see Touch demo in FT800 Demo1.bas
Can you explain or give an example of what you want to do ?

Quote:
demo4 is screensaver , it don't work correctly with my board

I tested it using a AtMega328P and it works fine so should the AtMega128CAN.

I have a AtMega128CAN board somewhere but not sure if it works, I will try and test tomorrow.

PS. I see now, you read the CAN bus messages and display it on the FT800/LCD.

_________________
Peter
Back to top
View user's profile
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Thu Mar 12, 2015 11:48 am    Post subject: Reply with quote

ok, thank you
yes I read CAN messages, but this is commercial project and I don't want speak about details on forum Smile
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Thu Mar 12, 2015 11:54 am    Post subject: Reply with quote

mototest2

Ok, np problem, when you said you wanted to read the x/y coordinates I was not sure
if there was a easier way to do what you want without making it complicated.

_________________
Peter
Back to top
View user's profile
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Thu Mar 12, 2015 3:34 pm    Post subject: Reply with quote

I have question, is possible use ISP SOFT for FT800 ? because I have one board without wires to SPI, I have only wires to JTAG ,maybe possible is connecting soft spi to jtag pins ?
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Fri Mar 13, 2015 7:20 am    Post subject: Reply with quote

mototest2

Using Software SPI it works well, but as for the other hardware issue I can't answer
as I am not familiar.

_________________
Peter
Back to top
View user's profile
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Fri Mar 13, 2015 8:53 am    Post subject: Reply with quote

I ask, because my m128can don't work, maybe I have bad config spi ?
For test I use the same pins as hardware spi, but spi I config SOFT
I have :
Code:

Config Ft800 = Spi , Ftsave = 0 , Ftdebug = 0 , Ftcs = Portb.0 , Ftpd = Portb.7
Config Spi = Soft , Din = Pinb.3 , Dout = Portb.2 , Ss = Portb.0 , Clock = Portb.1 , Data_order = Msb , Noss = 1  

Spiinit
 
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Fri Mar 13, 2015 9:15 am    Post subject: Reply with quote

mototest2

Quote:
demo4 is screensaver , it don't work correctly with my m128can board

I tested it today using AT90CAN32 (not 128) and the ScreenSaver demo workes fine.

Are you using the Gameduino2 board or PCB from FTDI ?

_________________
Peter
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Fri Mar 13, 2015 9:23 am    Post subject: Reply with quote

mototest2

Quote:
I ask, because my m128can don't work, maybe I have bad config spi ?
For test I use the same pins as hardware spi, but spi I config SOFT


Mmm.. the board I used is an Atmel DVK90CAN1 which originaly had a
AT90CAN128 but some time ago I damaged the micro so I replaced it with a AT90CAN128.

I program this board using the ISP connector whicht uses PORTE.x

The LCD is connected to the other SPI port which is PORTB.x

This is the basic setup I used:
Code:
Config ft800=spi , ftsave=0, ftdebug=0 , ftcs=portA.1 , ftpd=portA.0
Config Spi = Hard, Interrupt = Off, Data_Order = Msb, Master = Yes, Polarity = Low, Phase = 0, Clockrate = 4, Noss = 0

_________________
Peter
Back to top
View user's profile
mototest2

Bascom Member



Joined: 24 Dec 2006
Posts: 52

poland.gif
PostPosted: Fri Mar 13, 2015 9:29 am    Post subject: Reply with quote

In your example is hard spi, HARD works well, can you show me your working example with SOFT SPI ?
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4919
Location: Holland

blank.gif
PostPosted: Fri Mar 13, 2015 9:39 am    Post subject: Reply with quote

FT800 only works with HW SPI ! ( i must add , when using config ft800 , your original files i used do work with soft spi)
It did not make any sense to me to use slow bit bang mode.
But if you want it you can alter the lib and add some code to use soft spi.

_________________
Mark
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-AVR 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