Very nice. Would like to see the code for the gauges.
Have a nice holiday
Ben Zijlstra
↧
BASCOM Project Blog : Weatherstation : REPLY
↧
BASCOM-AVR Old versions : FM PLL Transmitter 88Mhz - 108Mhz, Using TSA5511 & Atmeg : REPLY
Most FM transmitter use the RDVV 300mW schematic
All you need is to connect SDA SCL (I2C) and +5V gnd from M16 to the transmitter board
[url=http://bygselvhifi.dk/audio/fm-stereo-rds-transmitter/]here is a good link lot of info and pcb sch ect[/url]
↧
↧
BASCOM Project Blog : Weatherstation : REPLY
Ben,
Very nice project !
This API is very interesting, and the ESP8266 make our programs be very small.
In fact, I'm using one ESP8266 to make an remote Power Off / delay 10 seconds / Power On again , to reset my cable modem that hangs sometimes and are located in other room, I use my Ipad in my Wi-Fi to make this .
Thank you again for share this new project !
Duval,
Your Gauges are very nice too, what display you are using ?
Paulo
↧
BASCOM Project Blog : Weatherstation : REPLY
to Ben
No thanks,
my weather station is a part of a great project that will unveil in september... secret!
:wink: :) :lol:
jp
↧
BASCOM Project Blog : Weatherstation : REPLY
to Paulo
I use Draw8 to draw the screen I will explain all in september (see my previous post to Ben)
Would you please follow this link, [url]http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=12505[/url] for the display and let me see thanks again to H.Kipnic for his job.
JP
:wink:
↧
↧
BASCOM Project Blog : Weatherstation : REPLY
To Ben again ! you know I'm a clown !
yes I would like to share my program but it is not completely finish I have to clean, to translate, please wait september !
:smt111
↧
BASCOM-AVR : 20 years ! : REPLY
Mark, also from my side a big THANK YOU and congratulations!
I started with Bascom-8051 (more then 15 years ago and it stills in use) and chanched later to AVR's.
I tried C in different flavors, but Bascom is "my" language, I understand what's happen, and it is
not necessary to write such crypto-code to let a LED blink:
{
DDRB |= _BV(DDB0);
while(1)
{
PORTB ^= _BV(PB0);
_delay_ms(500);
}
}
My big wish is, to have a Bascom-SAM for the Atmel SAM Controllers ... :-) ....
Kind regards from Switzerland
Thomas
↧
BASCOM-AVR : Checksum (CRC) calculation : NEWTOPIC
I am attempting to use the CRC8 function to validate a checksum on incoming data. The data is only 4 bytes long with a one byte checksum - from a remote control. I store the data in an array and then use:
CRC8 (myarray(1) , 4) to do it. The function works correctly, but can I change the polynomial value being used? I found a hint that setting a constant would do it. From the help:
When you want to use a different polynome, you can override the default by defining a constant named CRC8_POLY
Const CRC8_POLY = &HAA 'use a different value.
However this does not seem to work?
CRC16 has a lot of options to set to take care of this, but not CRC8. The incoming data checksum calculation is hardware encoded by the manufacturer of the remote control and cannot be changed.
Mike
[b:fa8e562b1b][color=red:fa8e562b1b](BASCOM-AVR version : 2.0.7.8 )[/b:fa8e562b1b][/color:fa8e562b1b]
↧
BASCOM-AVR : Check if fraction exist ? : NEWTOPIC
Hi,
I search solution to get if fraction exist, the value of fraction is needed for me.
The original value is byte.
A this time i check is fraction exist like this:
Dim Value as byte
Dim a as single
Value= 30
a = Value / 8 ' 3,75
If frac(a) > = 0 Then
....
End If
Another simple method exist without using single variable ?
Thanks
Olivier
[b:615c97baa3][color=red:615c97baa3](BASCOM-AVR version : 2.0.7.9 , Latest : 2.0.7.8 )[/b:615c97baa3][/color:615c97baa3]
↧
↧
BASCOM-AVR : Check if fraction exist ? : REPLY
Use Modulo math: see Bascom Help "mod"
↧
BASCOM-AVR : Check if fraction exist ? : REPLY
Many thanks.
Bye
Olivier
↧
BASCOM-AVR : overall undervoltage lockout for microcontroller and pheripe : REPLY
I use LTC4365 from Linear. You could get a sample from them. It's a hardware only solution.
I added a battery test button with green/red led if you are interrested.
↧
BASCOM-AVR : Check if fraction exist ? : REPLY
I had some problem with the use of modulo with single and double, maybe in the last version is fixed
but , sorry I forgot the name of the friend who gave me the solution but it is clever , very simple and works for all kind of variable (change the dim) !
Function Modsingle(byval Number As Single , Byval Modulo As Single) As Single
While Number > Modulo
Number = Number - Modulo
Wend
Modsingle = Number
End Function
jp
↧
↧
BASCOM-AVR : Checksum (CRC) calculation : REPLY
Looks like this option made it into the online help, but not into the lib.
The CRC8 function is to be found in mcs.lib, if you want to modify it, it's fairly easy.
First, create a safety copy of mcs.lib, this file is to be found in the Bascom program directory under subdir "lib".
Then use a text editor to open the original mcs.lib, serach for [b:cee0eb7f44][_CRC8][/b:cee0eb7f44].
Replace the following line after the label _Crc8: and Clr R16:
[code:1:cee0eb7f44] Ldi R22, &B10001100 ; crc8 poly value[/code:1:cee0eb7f44]
with this block:
[code:1:cee0eb7f44]#IF varexist("CRC8_POLY")
* Ldi R22, CRC8_POLY
#ELSE
Ldi R22, &B10001100 ; crc8 poly value
#ENDIF[/code:1:cee0eb7f44]
Save mcs.lib and compile: Tools --> Lib Manager --> highlight mcs.lib within left scroll window --> press "Compile"
If the manager doesn't complain, you're done.
Finally add the new poly to your code, as described by the online help.
↧
BASCOM-AVR : Checksum (CRC) calculation : REPLY
Works. Thanks.
It also appears that since user libraries are searched before the mcs.lib, I can duplicate the code in a new library, and once I reference it with the $Lib directive, the duplicated code will run instead of the code in the mcs.lib. That way there no chance of a typo getting into the main library.
Mike
↧
BASCOM-AVR : Checksum (CRC) calculation : REPLY
[quote:976325b8ff="MikeCraven"]Works. Thanks.
It also appears that since user libraries are searched before the mcs.lib, I can duplicate the code in a new library, and once I reference it with the $Lib directive, the duplicated code will run instead of the code in the mcs.lib.[/quote:976325b8ff]
Yes, I know. For a modified version behaving differently, it would be the right way. However here it's only upgrading a version, which does not comply with the help, with a version that does. Seems ok.
[quote:976325b8ff]That way there no chance of a typo getting into the main library.[/quote:976325b8ff]
With software you do not want a typo in critical code, doesn't matter where.
↧
BASCOM-AVR : Help with bootloader please... : NEWTOPIC
Hello all,
I am using an ATMEGA1281, 16Mhz xtal and COM1 to communicate with a PC over serial at 9600bps. My application program uses 8% of the programming space available - according to BASCOM. The application works perfectly without a bootloader. However, once I install a bootloader, which is based on Marks example the main application will not run.
The bootloader does work, it does accept the upload from the MCS bootloader windows application but the main app never starts.
I have the fuses set as:
BOOTSZ 1024 words start address = $FC00
BOOTRST is checked.
The bootloader.hex file appears to work, talking and receiving the data from the MCS Bootloader Windows app - here are some highlights:
[code:1:c7fb8b9fd7]
$hwstack = 40
$swstack = 40
$framesize = 40
$crystal = 16000000 '16MHz crystal
$baud1 = 9600 '38400 'this loader uses serial com
[/code:1:c7fb8b9fd7]
[code:1:c7fb8b9fd7]
$regfile = "m1281def.dat"
Const Loaderchip = 1281
[/code:1:c7fb8b9fd7]
[code:1:c7fb8b9fd7]
#if Loaderchip = 1281 ' Mega128
$loader = &HFC00 ' 1024 words
'$loader = &H7C00 ' 1024 words
'$loader = &H7800 ' 2048 words
Const Maxwordbit = 7 'Z7 is maximum bit '
Open "COM2:" For Binary As #1
Config Com2 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
#endif
[/code:1:c7fb8b9fd7]
The application code has nothing special in it for bootloading - did I forget something?
If anyone has any suggestions, I would really appreciate the feedback!
Thank you all,
Tim
[b:c7fb8b9fd7][color=red:c7fb8b9fd7](BASCOM-AVR version : 2.0.7.8 )[/b:c7fb8b9fd7][/color:c7fb8b9fd7]
↧
↧
BASCOM-AVR : Port changes from Input to Output : NEWTOPIC
Hello,
I am doing the following:
Config Portb.3 = Input
PortB.3 worked fine as an input for a while, but suddenly it changes to an Output either Hi State or Low state. I am not shure it changes after I Program the chip, or when I turn the power off/On.
To get it to work as an Input again, I have to config it as an Output, and then toggle the output Hi/Lo. Now I can configure it as an Input again, and it works again for a while.
Would that be the chip that is faulty, or can something else cause it? Using attiny167
Thanks,
gertc
[b:649144a037][color=red:649144a037](BASCOM-AVR version : 2.0.7.8 )[/b:649144a037][/color:649144a037]
↧
BASCOM-AVR : Port changes from Input to Output : REPLY
Maybe this can be helpfully for someone else, not You.
I saw that thing first twice when I was used Bootloader. It configured two, ore more pins like Outputs for driving LED`s. In code this is described but no anyone reading that..
Second behavioiour I was find is when You use lcd4bysy..It Configure whole port like Output and my Encoder on por causes dimming lighting when turned this thing :P So it is importand thing sommetimes to configure pins As Inputs after using somme config statements. They should be Inputs after reset but sommetimes it is worth to configured them :P
↧
BASCOM-AVR : Port changes from Input to Output : REPLY
I never saw a port change by itself from input to output during runtime on any AVR. Cartainly not from code. I would suspect possible high speed spikes on either power supply or port lines ( not necessarily the line you use, but any of them ).
↧