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

BASCOM-AVR : I need help understanding what's wrong with the sed1330 rout : REPLY

$
0
0
My apologies for the percistence, but after testing a large number of "8" lcds with the sed1330f I think I have reached the conclusion only can be the library that is not correct or incomplete, can anyone confirm or help? (BASCOM-AVR version : 2.0.8.0 , Latest : 2.0.7.8 )

BASCOM-AVR : How to get bytes count when use inputbin? : REPLY

$
0
0
MWS thank you for your reply. Because I have to use the payload length to distinguish my receiving objects. I have used Ischarwaiting() and inkey() to write a sub routing to achieve the required functionality. Just wonder if you can use inputbin directly to achieve the same goal. :lol:

BASCOM-AVR : I need help understanding what's wrong with the sed1330 rout : REPLY

$
0
0
[quote:c655238671="Porelo"][code:1:c655238671]$lib "glcd-sed1330.lib"[/code:1:c655238671][/quote:c655238671] Where this lib is from? My actual Bascom-version doesn't know it, I get a lib-not-found compile error.

BASCOM-AVR Old versions : I need help understanding what's wrong with the sed1330 rout : REPLY

$
0
0
Here https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=9540&highlight=sed1330

BASCOM-AVR : post removed : NEWTOPIC

$
0
0
why is my last post removed? :( [b:8326f68c5a][color=red:8326f68c5a](BASCOM-AVR version : 2.0.8.1 )[/b:8326f68c5a][/color:8326f68c5a]

BASCOM-AVR : post removed : REPLY

$
0
0
because you made a double post about the same topic. double posts and cross posts are not allowed.

EASY TCP/IP : I think, Config TCP is not confortable with W5500 : REPLY

$
0
0
:D thanks mark it works very well

BASCOM-AVR : uart and high baud : NEWTOPIC

$
0
0
Hello I do some communication between ardunio uno and pm532 (rfid) via UART. With uno is connected also lcd 4*40 i2c. I attach my code, maybe it will be useful for someone. So far i did only reading \\\"version info\\\" but it is very simple to create some additional frames to read other infos from pm532. But also I have qeustion at the end of my post :) [code:1:cc3554dd08] $regfile = \\\"m328pdef.dat\\\" $crystal = 16000000 $baud = 115200 \\\' use baud rate $hwstack = 32 \\\' default use 32 for the hardware stack $swstack = 10 \\\' default use 10 for the SW stack $framesize = 40 \\\' default use 40 for the frame space Config I2cdelay = 10 Config Twi = 100000 Config Scl = Portc.5 Config Sda = Portc.4 $lib \\\"bl_Lcd_i2c.lib\\\" \\\' AN #118 library from Kent \\\'zmienne ekranu I2C Dim _lcd_e As Byte Dim Backlight As Byte dim zapyt(9) as Byte dim wake_up(4) as Byte dim odp(20) as byte dim m as byte wake_up(1)=&H55 wake_up(2)=&H00 wake_up(3)=&H00 wake_up(4)=&H00 zapyt(1)=&H00 zapyt(2)=&H00 zapyt(3)=&HFF zapyt(4)=&H02 zapyt(5)=&HFE zapyt(6)=&HD4 zapyt(7)=&H02 zapyt(8)=&H2A zapyt(9)=&H00 \\\'Przerwanie do odbioru z portu UART Enable Interrupts Enable Urxc On Urxc Odbior Const Pcf_d4 = 4 Const Pcf_d5 = 5 Const Pcf_d6 = 6 Const Pcf_d7 = 7 Const Pcf_rs = 0 Const Pcf_rw = 1 Const Pcf_e1 = 2 Const Pcf8574_lcd = &H4E \\\'Defines the address of the I/O expander for LCD Backlight_on Alias &H08 Backlight_off Alias &H00 Backlight = Backlight_on _lcd_e = 128 cls do printbin wake_up(1),4 printbin zapyt(1),9 wait 1 loop Odbior: m=1 do odp(m)=waitkey() incr m loop until m=20 Locate 1 , 1 lcd \\\"Version PN532:\\\" Locate 2 , 1 lcd hex(odp(13));\\\" \\\";hex(odp(14));\\\" \\\";hex(odp(15));\\\" \\\";hex(odp(16));\\\" \\\";hex(odp(17)); Return [/code:1:cc3554dd08] It works, well at least for me :) The qestion: as you see there is very high baud because it is needed by pm532. When I use an interrupt Urxc then I have any problem to read frames from pm532. But such construction (all declaraion the same except Urxc interrupt): [quote:cc3554dd08] cls do printbin wake_up(1),4 printbin zapyt(1),9 a=ischarwaiting() if a>0 then m=1 do odp(m)=waitkey() incr m loop until m=20 Locate 1 , 1 lcd \\\"Version PN532:\\\" Locate 2 , 1 lcd hex(odp(13));\\\" \\\";hex(odp(14));\\\" \\\";hex(odp(15));\\\" \\\";hex(odp(16));\\\" \\\";hex(odp(17)); end if wait 1 loop [/quote:cc3554dd08] doesn\\\'t work. I don\\\'t know why. I suppouse the baudrate but maybe this code is wrong? Martin [b:cc3554dd08][color=red:cc3554dd08](BASCOM-AVR version : 2.0.8.0 , Latest : 2.0.8.1 )[/b:cc3554dd08][/color:cc3554dd08]

BASCOM-AVR : rfid pn532 : REPLY

$
0
0
So i attach working code for reading "version info" from pn532 in i2c mode. Maybe someone use it .. [code:1:1ad04994e4] $regfile = "m328pdef.dat" $crystal = 16000000 $baud = 115200 $hwstack = 80 $swstack = 80 $framesize = 90 Dim K As Byte Dim M As Word Dim Zapyt(9) As Byte Dim Wake_up(4) As Byte Dim dane(19) As Byte Dim addr_w as byte Dim addr_r as byte Wake_up(1) = &H55 Wake_up(2) = &H00 Wake_up(3) = &H00 Wake_up(4) = &H00 Zapyt(1) = &H00 Zapyt(2) = &H00 Zapyt(3) = &HFF Zapyt(4) = &H02 Zapyt(5) = &HFE Zapyt(6) = &HD4 Zapyt(7) = &H02 Zapyt(8) = &H2A Zapyt(9) = &H00 'I2C Config I2cdelay = 10 Config Twi = 100000 Config Scl = Portc.5 Config Sda = Portc.4 $lib "I2C_TWI.LBX" I2cinit 'print dane(1).7 ; " " ; dane(3).7 addr_w=&H48 addr_r=&H49 Do I2cstart I2cwbyte addr_w ' for m=1 to 4 ' I2cwbyte wake_up(m) ' next m for m=1 to 9 I2cwbyte zapyt(m) next m I2cstop waitms 50 I2cstart I2cwbyte addr_r for k=1 to 18 I2crbyte Dane(k) , Ack next I2crbyte Dane(19) , NAck I2cstop For K = 1 To 19 Print K ; " " ; Hex(dane(k)) Next wait 1 Loop End [/code:1:1ad04994e4]

BASCOM-AVR : Fastest IC : NEWTOPIC

$
0
0
Good day My question is very simple Which IC is the fastest I can program with Bascom. Unfortunately I can not find a list for it I hope you can help me here [b:62e4cb2a4c][color=red:62e4cb2a4c](BASCOM-AVR version : 2.0.8.1 )[/b:62e4cb2a4c][/color:62e4cb2a4c]

BASCOM-AVR : Fastest IC : REPLY

$
0
0
The seri xmega, but depends on the application, should be an always pondered choice. On the Up manufacturer's page you will find this information. Miguel

Share your working BASCOM-AVR code here : 16x32 RGB LED matrix panel : REPLY

$
0
0
[quote="O-Family"]Hi, mansur I do not understand the meaning of the question. What help do you need?[/quote] I mean, can you provide the full bascom source? because i'm not understand about your program in assembler: [code:1:30d50c8054]$notransform On 'Do not automatically correct instructions that use R23 or R0. ' $asm Tint2a: PUSH R2 IN R2,SREG 'Saved status register. PUSH R0 PUSH R1 PUSH XL PUSH XH ; LDS XL,{rowadr} 'Read the row address of the LED buffer. LDI XH, Ledbuff_Length 'Number of horizontal axis bytes of LED buffer. (32 horizontal dots * number of panels + scroll buffer) MUL XH,XL 'Calculate the position of the LED buffer. Loadadr Ledbuff(1) , X 'RGB LED panel The start address of the data buffer. ADD XL,R0 'Add the row address to the LED buffer. ADC XH,R1 ; LDS R0,{Transfer_Length} 'The number of bytes to transfer to the LED buffer. Tint2a1: LD R1,X+ 'Read lit data from the LED buffer. Out Panel_rgb , R1 'Set RGB data. SBI Panel_clk_p, Panel_clk_b 'Set the RGB LED panel [CLK] to [H]. CBI Panel_clk_p, Panel_clk_b 'Set the RGB LED panel [CLK] to [L]. DEC R0 BRNE Tint2a1 'If Transfer end for the number of horizontal axis bytes? Else ; LDS XL,{rowadr} 'Read row address. SBI Panel_oe_p, Panel_oe_b 'Set the RGB LED panel [OE] to [H]. (Turn off all LEDs) SBI Panel_lat_p, Panel_lat_b 'Set the RGB LED panel [LAT] to [H]. CBI Panel_lat_p, Panel_lat_b 'Set the RGB LED panel [LAT] to [L]. ; CBI Panel_a_p, Panel_a_b 'Set the row address to the port. CBI Panel_b_p, Panel_b_b CBI Panel_c_p, Panel_c_b SBRC XL,0 SBI Panel_a_p, Panel_a_b SBRC XL,1 SBI Panel_b_p, Panel_b_b SBRC XL,2 SBI Panel_c_p, Panel_c_b INC XL 'Increase row address. ANDI XL,$07 STS {rowadr},XL 'Save the row address. ; POP XH POP XL POP R1 POP R0 Out Sreg , R2 'Return status register. POP R2 CBI Panel_oe_p, Panel_oe_b 'Set the RGB LED panel [OE] to [L]. RETI $end Asm ' ' ************************************ ' * Timer2 Compare Match B interrupt * ' ************************************ ' $asm Tint2b: PUSH R24 SBI Panel_oe_p, Panel_oe_b 'Set the RGB LED panel [OE] to [H]. LDI R24,$FF STS {Ledintf},R24 'Set the LED display interrupt generation flag. POP R24 RETI $end Asm ' $notransform Off[/code:1:30d50c8054] Thanks for your attention.

BASCOM-AVR : Fastest IC : REPLY

$
0
0
follow options/chip in the IDE The speed is function of acceptable frequency ( mainly 20Mhz for mega series) more for xmega but the first reason you choice a speed is your program ! So what do you want to do ? JP :wink:

BASCOM-AVR : card reader : NEWTOPIC

$
0
0
Hi, I have the CRT-288D card reader, connected via RS232 to a micro ATMEL1284. specification of the command structure: [url]https://drive.google.com/file/d/1ktTtxcWlH32NmUm6QFzDJF_VOMDkblMA/view?usp=sharing[/url] is not clear to me, that is, the command string must be in ASCII? for example the command to initialize the reader 0×02 0×00 0×02 0×30 0×30 0×03 0×03 I send it with print chr (02); chr (00); chr (02); chr (30); chr (30); chr (03); chr (03); without spaces, CR and LF quite right? [b:ddeec8a31c][color=red:ddeec8a31c](BASCOM-AVR version : 2.0.8.1 )[/b:ddeec8a31c][/color:ddeec8a31c]

BASCOM-AVR : card reader : REPLY

$
0
0
Hello, I think that you should send an array of bytes, instead of string. Look below: printbin array_of_bytes(1), N where you start from 1-st byte and N is cout of bytes. Array might look like: array_of_bytes(1)=&H02 array_of_bytes(2)=&H00 array_of_bytes(3)=&H00 array_of_bytes(4)=&H30 and so on...

BASCOM-AVR : card reader : REPLY

$
0
0
two bytes are to be sent in ASCII, The CM, and PM bytes or am I wrong?

BASCOM-AVR : card reader : REPLY

$
0
0
Why not use the Demo Program and either an O'scope or a logic analyzer to actually see what the demo program sends? JC

BASCOM-AVR : Fastest IC : REPLY

$
0
0
Thanks for the quick responses . I have to evaluate an encoder with 2500 pulses per revolution

BASCOM-AVR : Fastest IC : REPLY

$
0
0
Hi, Maybe have a look at using an ICP (Interrupt Counter). This is nothing more than when a pin changes (Low->High or High->Low) a counter in incremented, and this all happens in hardware (your software only needs to read the counter every so often). Regards Ian Dobson

BASCOM-AVR : Fastest IC : REPLY

$
0
0
Have a look at the pulsein function I use it to decode infrared remote control using an interrupt Regards Paul
Viewing all 20597 articles
Browse latest View live


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