Quantcast
Channel: MCS Electronics Forum
Viewing all 20567 articles
Browse latest View live

BASCOM-AVR : FT800 : REPLY

$
0
0
twenty13 Can you please post a small demo so it can be tested?' Mark may spot something if he gets a chance to read this post.

BASCOM-AVR : FT800 : REPLY

$
0
0
Hi Peter and Mark, Thanks for your replies. A reduced version of the code is attached below. When "Lcdcal" in FT800.inc is set to "0" the display works fine except the touch points are not calibrated. The orientation bit is also set to "1". When "Lcdcal" is set to "1" then all functions up to "cmdcalibrate" executes as required but stops at "updatescreen" resulting in a blank white screen. I have the latest version of Bascom and use MK2 programmer and studio 6 to program. The program is very simple. There are 4 numbers and one button objects all incrementing. Every time when the button is touched the font size of the button should alternatively swop between 20 and 31. This same program is working fine with atmega328 including the calibration. [code:1:806fb3696e]$regfile = "xm128a1def.dat" $crystal = 32000000 $hwstack = 52 $swstack = 80 $framesize = 64 Config Osc = Enabled , 32mhzosc = Enabled Config Sysclock = 32mhz Config Vport0 = C Ddr0 = &B0000_0011 'configure the priority Config Priority = Static , Vector = Application , Lo = Enabled Config Com3 = 9600 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8 Open "COM3:" For Binary As #1 Config Submode = New Config Ft800 = Spid , Ftcs = Port0.6 , Ftpd = Port0.7 Config Spid = Hard , Master = Yes , Mode = 0 , Clockdiv = Clk32 , Data_order = Msb , Ss = None Config Base = 0 $include "FT800.inc" $include "FT800_Functions.inc" Declare Sub Widgets Declare Function Read_keypad() As Byte Declare Function Istouch() As Byte Dim My_cnt As Byte Dim My_text As String * 5 Dim Read_tag As Byte Dim Temp_tag As Byte ' used in Read_Keys() Function Dim Sk As Byte ' used in Read_Keys() Function Dim Read_sfk As Byte Dim Touch_detect As Byte Dim Tagx As Byte Dim Opt As Byte Dim M As Byte , N As Byte , P As Byte Dim Read_widget As Byte Dim Retistouch As Word Dim Readword As Dword Dim Tmp As Dword Dim Flag As Byte Key_detect Alias 0 My_text = " " N = 31 'font size Flag = 0 M = 0 P = 0 Spiinit If Ft800_init() = 1 Then End Do Waitms 15 Incr M My_text = Str(m) Widgets Loop End '------------------------------------------------------------------------------------------------------------ Sub Widgets '------------------------------------------------------------------------------------------------------------ Clearcolorrgb 64 , 64 , 64 Clear_b 1 , 1 , 1 Colorrgb 255 , 255 , 255 ' Flat effect and default Color background Cmdfgcolor &H0000FF Tagmask 1 Tag 1 Cmdnumber 50 , 30 , 29 , 0 , M Tag 2 Cmdnumber 245 , 30 , 29 , 0 , M Tag 3 Cmdnumber 50 , 150 , 29 , 0 , M Tag 4 Cmdnumber 244 , 150 , 29 , 0 , M Tag 5 Cmdbutton 300 , 200 , 100 , 50 , N , 0 , My_text Tagmask 0 Read_widget = Read_keypad() If Flag.key_detect > 0 Then Flag.key_detect = 0 If Read_widget = 5 Then P = Not P If P = 255 Then N = 31 'P = 0 Updatescreen End If If P = 0 Then N = 20 'P = 1 Updatescreen End If End If End If Updatescreen End Sub ' Widget_Button '------------------------------------------------------------------------------------------------------------ Function Read_keypad() As Byte Local Read_tag As Byte Local Ret_tag As Byte Read_tag = Rd8(reg_touch_tag) If Istouch() = 0 Then Touch_detect = 0 If Read_tag <> 0 Then ' Allow if the Key is released If Temp_tag <> Read_tag And Touch_detect = 0 Then Temp_tag = Read_tag ' Load the Read tag to temp variable Touch_detect = 1 End If Else If Temp_tag <> 0 Then Flag.key_detect = 1 Read_tag = Temp_tag End If Temp_tag = 0 End If Read_keypad = Read_tag End Function ' Read_Keypad '------------------------------------------------------------------------------------------------------------ Function Istouch() As Byte Local Retistouch As Word Retistouch = Rd16(reg_touch_raw_xy) Retistouch = Retistouch And &H8000 Istouch = Retistouch End Function[/code:1:806fb3696e]

BASCOM-AVR : OLED Display : REPLY

$
0
0
Hello Marc First of all, thanks for the good and fast support. Anyway, it seems my Oled Display went defective. No,Display or random characters and so on. so, I could not check your sugestions. I will purchase a new one and then we will see. With kind regards Hubert P.S. I received the OLED with a broken SMD coil, so repaired it temporarly(as you can see at the picture) I suppose the defective coil cause a prelimary damage.

Various : Serial to wireles to Ethernet : REPLY

$
0
0
Here is how to use it to send and receive HTTP data http://rayshobby.net/first-impression-on-hlk-rm04-serial-to-wifi-module/ Very easy, not fast but if you use it for simple web pages it should work well. Going to need a big buffer in the AVR so the mega1284p would be good. Regards Paul

BASCOM-AVR : Atxmega2E5 USART enable / disable ? : NEWTOPIC

$
0
0
Hi, At Atxmega32E5 I need sometimes in program to use PORTD.3 for other putpose. When I use Usartd0_ctrlb = &B00000000 then I disable USART but pin is in low state and I can not set it to high level. When I use Usartd0_ctrlb = &B00001000 (TXEN) then USART is not active. Where is problem ? Thanks [b:36e5a34356][color=red:36e5a34356](BASCOM-AVR version : 2.0.7.8 )[/b:36e5a34356][/color:36e5a34356]

BASCOM-AVR : FT800 : REPLY

$
0
0
Hi Guys, I think I have it sorted. For Xmega (1) Have added "EEPROM=MAPPED" and (2) made changes to Sub Waitcmdfifoempty() - blocked out ! jmp _ftWaitCmdFIFOempty and removed the block setting under to allow the rest of the code to execute.javascript:emoticon(':lol:')

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

$
0
0
I still cant proper use this lcd with atmega 32 / 128 tqfp, atmega32 dip 40 works ok. but tqfp not works, only works "clear lcd" see this photo. code is "lite" for atmega32 please help... [/img]

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

$
0
0
the DIP and TQFP are the same. So when there is a problem, the biggest probability is that it is hardware related. - what kind of hardware do you use? - is the ground pad of the chip really connected to ground? - are you sure the fuse bits are correctly set? - as always : do a test on each of the used pins and see if you can control them with some simple code like: config portX.y=output do toggle portX.y waitms 1000 loop where x and y are for the port and pin.

BASCOM-AVR : Atxmega2E5 USART enable / disable ? : REPLY

$
0
0
usartd0_ctrlb.3=0 'disable TX config PORTD.3=output portd.3= someState and to re-enable, just write ctrlb bit 3 to 1.

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

$
0
0
I use only TQFP & MLF packages and it works fine. :smt102

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

$
0
0
Try updated library - added Landscape/Portrait and some fixes. Also try to increase stack.

Share your working BASCOM-AVR code here : Large displays : REPLY

$
0
0
SPF-87H is SAMSUNG (not SONY). It can work as second display for PC. If it not working with Win7 64bit you can use small program to send JPEG compressed picture to it. Communication is easy - send 12 bytes ($a5, $5a, $18, $04, Xmsb, Xlsb, Ymsb, Ylsb, $48, $00, $00, $00) and when JPEG picture via USB in BULK mode. Details here: http://web.media.mit.edu/~gracewoo/stuff/picframe/ It works in Raspberry too - http://www.puschmann.net/page/?page_id=62 For AVR-8 this is impossible. But we can use Banana Pi as VideoCard. http://bananapi.com/index.php/component/content/article?layout=edit&id=24 Onboard GPU Mali400MP2 over OpenGL can draw dots, any basic figures (with multicolor fill, smooth, shadows), PNG sprites with transparent, Jpeg photo, AVI/Mpeg video, MP3 sound and so on... May be used HDD, video input, Remote IR and many other. Display may be HDMI FullHD, any VGA monitor, LCD panel with RGB or LVDS interface and Touchscreen, TV. Two displays can work simultaneously. AVR library will be small (need only transmit command, file number, color, text) so we can use small AVR, and very fast. Commands may send via SPI, WiFi, I2C... I bye my Banana for $35 (equal to Raspi). Display with FT800 cost much more.

BASCOM-AVR : FT800 : REPLY

$
0
0
twenty13 Sorry for the delay, I had to repair an xmega board I had lying around and just got it working. I copied your code and just made a port change for CS and PD and it all worked regardless of the state of LcdCal. I don't know why you had to make those changes as mine worked first up, so I am not sure what is going on. Are you running the current Bascom version 2078 ?

BASCOM-AVR : FT800 : REPLY

$
0
0
Since he is using the inc files from 2078, he must be using 2078. It is simplest to write to support. There we can check version and serial and can we offer updated files so we can identify the cause.

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

$
0
0
when it works with PDIP it must work with TQFP too. There is no difference except for the housing. There was no circuit included but as far as i can tell from the pcb, it looks to be ok. So still my advice : check pin by pin if they can be controlled by the micro. And check the fuse bits for oscillator and clock divider.

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

$
0
0
[quote:881b79e1ca="Arek2014"]look at this pcb in eagle,[/quote:881b79e1ca] Pcb looks ok, what about a schematic?

BASCOM-ARDUINO : ILI9327 on Arduino Mega : REPLY

$
0
0
Hi folks, I am working on code for the same display TFT240x400 but with a different controller: HX8352 instead of ILI9327. Almost done (will post it when fully done), but I am puzzled by [code:1:c086482364]Sub Ili9327_setxy_[u][b]frame[/b][/u](byval X1 As Word , Byval Y1 As Word , Byval X2 As Word , Byval Y2 As Word) [/code:1:c086482364] What is it supposed to do ? There is another sub [code:1:c086482364]Sub Ili9327_setxy(byval X1 As Word , Byval Y1 As Word , Byval X2 As Word , Byval Y2 As Word)[/code:1:c086482364] which I already translated to HX8352-instructions. So what does Frame-version of Sub Ili9327_setxy(etc) do more ? Thanks for all your good work ! Nard

Share your working BASCOM-AVR code here : NOKIA-N73 LCD Library : REPLY

$
0
0
hmmm with new library is still the same problem.... maybe i have damage lcd ? I will buy new lcd and try again. Schematic is poor, ugly so i didnt upload.

BASCOM-AVR : Two different $timeout values for COM1 and COM2 in ATMEGA 12 : NEWTOPIC

$
0
0
Hello, I would like to have two different $timeout values for hardware COM1 and COM2 in Atmega 128. Is it somehow possible? I use BASCOM AVR 2.0.7.8 Thanks in advance for your help :) [b:9b6af46466][color=red:9b6af46466](BASCOM-AVR version : 2.0.7.8 )[/b:9b6af46466][/color:9b6af46466]
Viewing all 20567 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>