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

BASCOM-AVR : Sample Electronics programmer not working in Win 7 : REPLY

$
0
0
it means the card is not working or that the supplied address is not correct. did you tried if the card will print to a printer? I can test later with my old PCI I/I card, providing there is an updated driver and that it fits.

Share your working BASCOM-AVR code here : Arduino Mega W5100 ethernetshield with SD-card : REPLY

$
0
0
@Ben, Nice demo app!!! I purchased a Funduino 2560 and works GREAT with BASCOM and your code. A couple questions. I notice that the click counter is always = 1 on my page. I clicked on everything...I think...I suspect it is the LED button under the AUS label???? Is it suppose to increment? When I click the Seite1 button, it does correctly identify my IP, but the clock time is not correct and remains unchanged. Going to go look at the code but wanted to know the intended operation 1st. GREAT work again! Going to try some of your other samples as well. Regards, Mark

BASCOM-AVR : lib and obj : REPLY

$
0
0
Thank you Mark, For the quick and through reply. I will try that and reply. Best Regards, Devidas

BASCOM-AVR : XMEGA and 40*4 LCD : REPLY

$
0
0
I couldn't make the $lib "lcd4E2.lbx" work... So I did all BASIC lines, like this. But third and forth lines are not initializing. and third line is over-writing the first line. $regfile = "xm256d3def.dat" $crystal = 2000000 $hwstack = 64 $swstack = 40 $framesize = 40 Config Osc = Enabled Config Sysclock = 2mhz , Prescalea = 1 , Prescalebc = 1_1 ' use 32 MHz $lib "xmega.lib" $external _xmegafix_clear $external _xmegafix_rol_r1014 dim ___LCDNO as byte Config Lcd = 40*4 Config Lcdpin = Pin , Rs = Portb.0 , E = Portb.2 , E2 = PortB.3 , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 Cls locate 1,1 Lcd " DEVIDAS BHONDE." locate 2,7 Lcd " INTEGRATED MARKING MACHINE." locate 3,1 lcd "-----------" ' This third line is overwriting the first line. config portd=output loop1: reset portd.7 ' blinky LED waitms 100 set PORTD.7 waitms 100 goto loop1 '-------------------------------------------------------------- Please help, Regards, Devidas

Various : iPad Retina screen to a PC... : NEWTOPIC

$
0
0
Retina screen connected to a PC (perhaps later to an atXmega).. http://emerythacks.blogspot.ca/2013/04/connecting-ipad-retina-lcd-to-pc.html Have fun Ben Zijlstra

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
[code:1:265e2d9393]Config Portd.2 = Output Spi_en_wiz810 Alias Portd.2 'SPI enable of WIZ810MJ Set Spi_en_wiz810 Config Portc.1 = Output 'Reset WIZ810MJ Wiz5100_res Alias Portc.1 Config Portc.0 = Output 'CS WIZ810MJ Config Spi = Hard , Interrupt = Off , Data Order = Msb , Master = Yes , Polarity = Low , Phase = 0 , Clockrate = 4 , Noss = 0 Spiinit 'Reset modułu z programu Bena... Wiz5100_res = 1 Waitms 10 Wiz5100_res = 0 Waitms 100 Wiz5100_res = 1 'Reset modułu z programu Bena... Config Tcpip = Noint , Mac = 00.40.66.34.56.78 , Ip = 192.168.1.19 , Submask = 255.255.255.0 , Gateway = 192.168.1.1 , Localport = 8000 , Tx = &B11 , Rx = &B11 , Chip = W5100 , Spi = 1 , Cs = Portc.0 [/code:1:265e2d9393] You should connect to W5010 (WIZ810MJ) also signals: CS, Reset and SPI_enable. Plesae read bacom Help and Ben's site.

BASCOM-AVR : Generate constant of the .bas Filename? : REPLY

$
0
0
i added 3 constants for major, minor and build version. while unused constants are not stored in code you could do this : Restore Label Read B1 Label: Data _Version_major

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
[quote:eb89ce9f96="bzijlstra"]See my question above and here [quote:eb89ce9f96]What are you doing with the SPI_enable line of the WIZ810MJ? What have you done with the reset of the WIZ810MJ? [/quote:eb89ce9f96] Have you had a look at the hardware on my homepage? Ben Zijlstra[/quote:eb89ce9f96] I check your link and tried this code [code:1:eb89ce9f96] $regfile = "m32def.dat" $crystal = 16000000 $hwstack = 64 $swstack = 64 $framesize = 64 'Common registers 'Mode register Const W5100_mr = &H0000 'Gateway address registers Const W5100_gar0 = &H0001 Const W5100_gar1 = &H0002 Const W5100_gar2 = &H0003 Const W5100_gar3 = &H0004 'Subnet mask Address registers Const W5100_subr0 = &H0005 Const W5100_subr1 = &H0006 Const W5100_subr2 = &H0007 Const W5100_subr3 = &H0008 'Source Hardware Address registers Const W5100_shar0 = &H0009 Const W5100_shar1 = &H000A Const W5100_shar2 = &H000B Const W5100_shar3 = &H000C Const W5100_shar4 = &H000D Const W5100_shar5 = &H000E 'Source IP Address registers Const W5100_sipr0 = &H000F Const W5100_sipr1 = &H0010 Const W5100_sipr2 = &H0011 Const W5100_sipr3 = &H0012 Dim Value As Byte Dim Adres As Word Dim Adresl As Byte At Adres Overlay Dim Adresh As Byte At Adres + 1 Overlay ' 0 = long board ' 1 = sandwichboard Const Board = 1 'Used Wiz5100 ports and pins Wiz5100_cs Alias Portb.2 'Chipselect WIZ5100 #if Board 'sandwichboard Wiz5100_res Alias Portd.3 'reset of WIZ810MJ 'Other used ports and pins Relais1 Alias Portd.4 Relais2 Alias Portd.5 Relais3 Alias Portd.6 Relais4 Alias Portd.7 #elseif Wiz5100_res Alias Portc.0 'long board Relais1 Alias Portc.1 Relais2 Alias Portc.2 Relais3 Alias Portc.3 Relais4 Alias Portc.4 #endif 'Used ports and pins Config Wiz5100_cs = Output Config Wiz5100_res = Output 'Configuration of the SPI-bus Config Spi = Hard , Interrupt = Off , Data Order = Msb , Master = Yes , Polarity = Low , Phase = 0 , Clockrate = 4 , Noss = 0 'Init the spi pins Spiinit 'Here we declare the used sub routines Declare Sub Wiz5100_init Declare Sub Wiz5100_readvalue(byval Reg As Word) Declare Sub Wiz5100_writevalue(byval Reg As Word , Byval Value As Byte) Declare Sub Wiz5100_reset Dim Wiz5100_opcode_read As Byte Wiz5100_opcode_read = 15 Dim Wiz5100_opcode_write As Byte Wiz5100_opcode_write = 240 Call Wiz5100_init 'We initialize the Wiz5100 Do Loop End Sub Wiz5100_init Call Wiz5100_reset 'Hardware reset 'Register reset Call Wiz5100_writevalue(W5100_mr , &H80) Call Wiz5100_writevalue(w5100_gar0 , 192) Call Wiz5100_writevalue(W5100_gar1 , 168) Call Wiz5100_writevalue(W5100_gar2 , 0) Call Wiz5100_writevalue(w5100_gar3 , 254) Call Wiz5100_writevalue(W5100_subr0 , 255) Call Wiz5100_writevalue(W5100_subr1 , 255) Call Wiz5100_writevalue(W5100_subr2 , 255) Call Wiz5100_writevalue(w5100_subr3 , 0) Call Wiz5100_writevalue(W5100_shar0 , &H00) Call Wiz5100_writevalue(W5100_shar1 , &H10) Call Wiz5100_writevalue(W5100_shar2 , &H20) Call Wiz5100_writevalue(W5100_shar3 , &H30) Call Wiz5100_writevalue(W5100_shar4 , &H40) Call Wiz5100_writevalue(w5100_shar5 , &H50) 'Set own IP address Call Wiz5100_writevalue(W5100_sipr0 , 192) Call Wiz5100_writevalue(W5100_sipr1 , 168) Call Wiz5100_writevalue(W5100_sipr2 , 0) Call Wiz5100_writevalue(W5100_sipr3 , 73) End Sub Sub Wiz5100_readvalue(reg) Adres = Reg Reset Wiz5100_cs Spiout Wiz5100_opcode_read , 1 Spiout Adresh , 1 Spiout Adresl , 1 Spiin Value , 1 Set Wiz5100_cs End Sub Sub Wiz5100_writevalue(reg , Value ) Adres = Reg Reset Wiz5100_cs Spiout Wiz5100_opcode_write , 1 Spiout Adresh , 1 Spiout Adresl , 1 Spiout Value , 1 Set Wiz5100_cs End Sub Sub Wiz5100_reset Wiz5100_res = 1 Waitms 10 Wiz5100_res = 0 Waitms 30 'Minimum 20 µs Wiz5100_res = 1 End Sub [/code:1:eb89ce9f96] I connected pins CS and Reset. If i send ping to 192.168.0.73 but modul didn't respone.

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
[size=24:aa8e02b0ba][color=red:aa8e02b0ba]SPI_enable[/color:aa8e02b0ba][/size:aa8e02b0ba] should be connected with a resistor to VCC. See the schematic on my homepage. Have fun Ben Zijlstra

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
And to be complete. How is your module connected to the network, how is your PC connected to the network. What is the IP-address of your PC?

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
[quote:d92dbd70c1="bzijlstra"]And to be complete. How is your module connected to the network, how is your PC connected to the network. What is the IP-address of your PC?[/quote:d92dbd70c1] By this PDF [url]http://www.tme.eu/cz/Document/b8f1cbb6491703b1bb14331982f52e62/wiz810mj.pdf[/url] I connect JP2 9 with VCC through resistor. My computer has address 192.168.0.50 Modul is connected with my computer through by switch.

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
What about the fusebits. Did you disable Jtag?

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
What about the leds on the Wiz810mj? Do you get a link? Two leds, which one is on. On the switch do you have a link? On what voltage your Atmega32 is running? Is it possible to put your pc fixed on a ip address and connect the wiz with a crosscable to your pc and do a ping? What leds are on when you do this? There is a small led test on my homepage. Does that work? We could check with this test if SPI is running wel. Did you check your reset signal with a scope? Ben Zijlstra

EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY

$
0
0
What about the fusebits. Did you disable Jtag?

BASCOM-AVR : XMEGA and 40*4 LCD : REPLY

$
0
0
Refer to this post, http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=10913&highlight=

BASCOM-AVR : XMEGA and 40*4 LCD : REPLY

$
0
0
Thanks Rick, I solved the problem today afternoon. It was due to clock startup of xmega. initlcd did it. Other aspects of vport were explained by Mark. But xmega internal clock seems to have slow startup. And if we init the lcd before that, it gets confused. Now 40 x 4 LCD is working fine. I am happy. BASCOM list members and Mark himself are very helpful. Best Regards, Devidas

BASCOM-AVR : XMEGA and 40*4 LCD : REPLY

$
0
0
Good to hear you have it figured out. Slow start? Try $NORAMCLEAR

BASCOM-AVR : Translating C code to Bascom-AVR : REPLY

$
0
0
[quote="rabiuls"]Hello all, I am not good in C language, and there are many examples in C. I try to understand or convert the code. For now can someone please tell me how to convert/translate C bit operation to Bascom-AVR. I am giving some examples bellow. How to write the same in Bascom-AVR: Hi Rabiuls, I am also translating C in to Bascom, because I am also not good in C I use a book, written by Elektor (Bascom) Arduino (C board) contains Atmel m328p, It is programmable in Bascom. Running the original C files, the translated Bascom must give the same result If not, then there is something broken, or you made a program error. When the original C program still works, then you must check your Bascom program. In this way I translated the first 3 chapters, I learned a lot about Bascom Arduino people can consider stepping over to Bascom. Greeting Dré

BASCOM-AVR : RTTY decode? : NEWTOPIC

$
0
0
Before I reinvent the wheel, has anyone done the coding to decode standard FSK? A quick search says no :D [b:00455f1d4a][color=red:00455f1d4a](BASCOM-AVR version : 2.0.7.6 )[/b:00455f1d4a][/color:00455f1d4a]

BASCOM-AVR : RTTY decode? : REPLY

$
0
0
Hello Ken RTTY does that bring back memories, since its just mark and space like the infra-red work I did I think my programs that decode the infra-red would be able to decode it once you have the tones decoded (which I have circuits for) it then depends if its ASCII being transmitted if so then bascom knows ASCII. Have a look in the blog section you will see the original infra-red blog and in the other posts where I am using it to do other tasks like reading code from DHT11 sensors (watering system) its even reading data on a SPI buss for one forum member, it could even read morse, now I am getting more ideas! Regards Paul
Viewing all 20665 articles
Browse latest View live


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