See my question above and here
[quote:a62df29bae]What are you doing with the SPI_enable line of the WIZ810MJ?
What have you done with the reset of the WIZ810MJ?
[/quote:a62df29bae]
Have you had a look at the hardware on my homepage?
Ben Zijlstra
↧
EASY TCP/IP : Atmega32 and Wiznet W5100 : REPLY
↧
BASCOM-AVR : day of Week and Month : NEWTOPIC
Can anybody help my with a problem that I have to view the day and month.
the day of the week is working but the month as a "word" will not work.
my test code that I use is: (what's wrong)
$regfile = "m32def.dat" ' specify the used micro
$crystal = 8000000 ' used crystal frequency
$baud = 19200 ' 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
$sim
Config Clock = Soft ' we use build in clock
Config Date = Dmy , Separator = - ' ANSI-Format
Enable Interrupts
Dim Bweekday As Byte , Strweekday As String * 9
Dim Bmonthday As Byte , Strmonthday As String * 12
_day = 23 : _month = 01 : _year = 13 ' Load RTC-Clock for example - testing
Bweekday = Dayofweek()
Strweekday = Lookupstr(bweekday , Weekdays)
Bmonthday = Dayofweek()
Strmonthday = Lookupstr(bmonthday , Monthdays)
Print Strweekday ; " " ; _day ; " " ; Strmonthday
End 'end program
Weekdays:
Data "MAANDAG" , "DINSDAG" , "WOENSDAG" , "DONDERDAG" , "VRIJDAG" , "ZATERDAG" , "ZONDAG"
Monthdays:
Data "JANUARI" , "FEBRUARI" , "MAART" , "APRIL" , "MEI" , "JUNI" , "JULI" , "AUGUSTUS" , "SEBTEMBER" , "OKTOBER" , "NOVEMBER" , "DECEMBER"
[b:b6c114d317][color=red:b6c114d317](BASCOM-AVR version : 2.0.7.6 )[/b:b6c114d317][/color:b6c114d317]
↧
↧
BASCOM-AVR : day of Week and Month : REPLY
Try this
[code:1:93d25f1a96]Config Clock = Soft ' we use build in clock
Config Date = Dmy , Separator = - ' ANSI-Format
Enable Interrupts
Dim Bweekday As Byte , Strweekday As String * 9
Dim Bmonthday As Byte , Strmonthday As String * 12
_day = 23 : _month = 04 : _year = 13 ' Load RTC-Clock for example - testing
Bweekday = Dayofweek()
Strweekday = Lookupstr(bweekday , Weekdays)
Strmonthday = Lookupstr(_month , Monthdays)
Print Strweekday ; " " ; _day ; " " ; Strmonthday
End 'end program
Weekdays:
Data "MAANDAG" , "DINSDAG" , "WOENSDAG" , "DONDERDAG" , "VRIJDAG" , "ZATERDAG" , "ZONDAG"
Monthdays: ' ( 0="" 1="JANUARI" )
Data "" , "JANUARI" , "FEBRUARI" , "MAART" , "APRIL" , "MEI" , "JUNI" , "JULI" , "AUGUSTUS" , "SEBTEMBER" , "OKTOBER" , "NOVEMBER" , "DECEMBER"
[/code:1:93d25f1a96]
↧
BASCOM-AVR : day of Week and Month : REPLY
Thanx
Visovian
It's so simple if you know how
it works verry good
↧
BASCOM-AVR : Calculator percent error rate in the port : REPLY
You will have to be more specific. What baud rate and crystal frequency ? At most 'normal' baud rates, ie the ones 115300 baud and below, and with reasonable crystal frequencies, say 4MHz and above, the speed error on a software UART should be well within tolerance ( certainly below 2% ). You could look in the relevant library to see how the software loops are done, and if they are likely to introduce errors.
Are you getting UART errors in a particular application ?
If you are getting UART errors, you might also consider that a software UART samples the line level only once per bit time, whereas a hardware UART samples the line 16 times, and chooses the most common value for the line level. This inherently means the hardware UART is less susceptible to line noise.
And while it is true that in principal you can get smaller speed errors using software UARTs, you should always remember that software UARTS consume much processor time and cycles, during which you cannot do anything else.
My personal opinion is that you should only use software UARTs for debugging tests, or other very infrequent use, or when no other possible hardware UART solution is available.
To avoid baud rate errors, choose a crystal frequency which is a multiple of 1.732 MHz, then all the standard baud rates are available with no error on a hardware UART.
↧
↧
BASCOM-AVR : lib and obj : NEWTOPIC
Hi,
The lib file contains object code.
Is it that all avr, including xmega have same object code for respective instructions ?
Otherwise universal lib file is not possible.
Regards,
Devidas
[b:d086ffdfae][color=red:d086ffdfae](BASCOM-AVR version : 2.0.7.6 )[/b:d086ffdfae][/color:d086ffdfae]
↧
BASCOM-AVR : Calculator percent error rate in the port : REPLY
I know all this and understand it.
No error, I now do not get, I want to know the future and take into account the moments of errors (because they are not immediately, but Immersed cumulative form, ie if the packets are small, it is possible to work with a high percentage of errors).
BASIC is needed just to upraschaet writing code and not sitting understand C or asemblere. Once the developer has written SW UART, I want to know the outcome, and not understand its code (because trust).
I just wanted to simplify ...
↧
BASCOM-AVR : lib and obj : REPLY
was this a rhetorical question?
↧
BASCOM-AVR : lib and obj : REPLY
No Mark,
Its a plain question. :)
I really know very little about avr. Rather think I am bit lazy to find out. So I wrote in surprise.
I looked into the lib files as you suggested, and their lbx versions. And I didn't find any ref to processor type.
Regarding LCD 40 * 4 , I tried some changes as follows (but didn't work)
In my code,
config vport0 = b
$lib "lcd4E2_new.lbx"
-----------------------------------
in "lcd4E2_new.lib" file, changed these lines, then compiled it using lib manager,
[_Init_LCD]
.EQU LCDDDR=$16 ;
.EQU LCDPORT=$17 ; changed for xmega
But still LCD not initialised.
------------------------------------------
BTW, I am sending money for Basic support subscription.
That will make me more comfortable to ask questions.
And heartful thanks for these great compilers. Made my life very easy :-)
(I could never get the hang of C language :-(
Best Regards,
Devidas
↧
↧
BASCOM-AVR : lib and obj : REPLY
- you really should read some data sheet. it contains good valuable information.
- this forum is free, do not confuse it with official support
- the object code is the same for all chips. it would be very dumb if it were different. BUT : not all chips implement all the instructions. once in a while atmel implements a new assembler mnemonic. and it is hard to understand for me why they do not implement all the instructions in all the new chips. maybe it is a question of space/cost, i do not know.
for the virtual ports you can map a port which has an extended address to a port with a low address.
Config Vport0 = D ' portD can now be accessed as port0
See also the sample "Mapping Real Ports to Virtual Ports.bas" in the samplesxmega folder
Now the beauty of Xmega is that all the registers are at the same address. So portD:
DDR0=16 'DECIMAL !!!
PORT0=17
PIN0=18
so the lib becomes :
.EQU LCDDDR=16 ; decimal
.EQU LCDPORT=17 ; changed for xmega
So watch the $ !!
↧
BASCOM-AVR : SETTCP : NEWTOPIC
Does anyone know what format(s) can be used for the IP address with SETTCP?
Can it take the LONG format? (It is not clear at all in BASCOM's help)
I have seen in http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=630&highlight=settcp
Settcp Mac_adress(1) , Ip_adress(1) , Mask_adress(1) , Gate_adress(1)
Where :
Ip_adress(1) = 100
Ip_adress(2) = 1
Ip_adress(3) = 168
Ip_adress(4) = 192
But I have seen in http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=11141&highlight=settcp
Settcp Eth_mac(1).eth_mac(2).eth_mac(3).eth_mac(4).eth_mac(5).eth_mac(6) , _
Ip_ , _
Subnetmask_ , _
Gateway_
Where:
Dim Ip_ As long
Ip_ = Maketcp(192 , 168 , 1 , 2)
And both are said to be working!
[b:46e1f8bf38][color=red:46e1f8bf38](BASCOM-AVR version : 2.0.7.6 )[/b:46e1f8bf38][/color:46e1f8bf38]
↧
BASCOM-AVR : Canbus Noob. Help Required please : NEWTOPIC
Hi
I'm venturing out on a project with Canbus to link-up in a daisy chain fashion on a project. I'm using a off the shelf Chip45 Crumb128/Can module.
The MCU is a AT90CCAN128 chip.I have had a bit of a play and can seem to get the micro performing well.
Question1
Now i'm venturing into the Canbus side of things and have run into a bit of wall.
I have copied the 'CAN-Elektor.bas ' example in the help and have deployed it to the micro and run it up.
In the example there is a 'Bok = Cansend(1 , Portc)' command and returns a Err flag number.
I'm getting a value 1 returned instead of a 0. What is the err returned (1)???
Question 2
In the example. Do i deploy the same example to both modules???
or does the code need to be altered for the Sender module and the Receiver Module??
Thank
Snowie :?
[b:2f69fed11a][color=red:2f69fed11a](BASCOM-AVR version : 2.0.7.6 )[/b:2f69fed11a][/color:2f69fed11a]
↧
BASCOM-AVR : Canbus Noob. Help Required please : REPLY
like the help says: the return value is the CANSTMOB register content. you can check the PDF to see what it means.
for the can128 it means : Bit 0 AERR: Acknowledgment Error
the sample must be loaded in both boards. they both send the dip switch state once you change the switch. and they both receive the state message.
↧
↧
BASCOM-AVR : SETTCP : REPLY
both are allowed.
↧
BASCOM-AVR : SETTCP : REPLY
Great!
However I still get a "Invalid data type" error when compiling:
Settcp Ip_address
do I need to put the MAC, SUBMASK and GATEWAY parameters perhaps?
↧
BASCOM-AVR : Canbus Noob. Help Required please : REPLY
Thank you Mark, it is much appreciated
↧
BASCOM-AVR : SETTCP : REPLY
you need to provide all the parameters.
when you only want to alter one you could check settcpregs
↧
↧
BASCOM-AVR : SETTCP : REPLY
Good to know. Thanks
↧
BASCOM-AVR : Sample Electronics programmer not working in Win 7 : REPLY
in the mean time i also tested under WIN8. Using the new setup it installer properly.
So the only problem : to find the proper base address.
When you select sample electronics programmer, you can also use the test menu to set the level of the used pins. this way you can check with a multimeter if the pins can be set/reset.
↧
BASCOM-AVR : Sample Electronics programmer not working in Win 7 : REPLY
hi, I tried all combinations (9) of LPT1,LPT2,LPT3 and EFD8,EFD4,EFE0 and it would not program the chip.
I also tried TEST pin #2 and it was always low, also pin #11 is always high (5v). Does this mean anything? - Dave
↧