Author |
Message |
Topic: CANsend() hangs during every 2nd call. |
Neill
Replies: 8
Views: 3408
|
Forum: BASCOM-AVR Posted: Tue Sep 05, 2023 6:29 am Subject: CANsend() hangs during every 2nd call. |
i wrote the lib and bascom support many years ago. for the elektor board and article.
i do remember that this was hard to grasp since i had almost no prior knowledge to CAN.
i think it took me some ... |
Topic: CANsend() hangs during every 2nd call. |
Neill
Replies: 8
Views: 3408
|
Forum: BASCOM-AVR Posted: Mon Sep 04, 2023 8:33 am Subject: Still the same |
Thank you, Gentlemen, for your replies.
For a bit of background this issue I'm having is for a so called "Man In The Middle Attack" system. The AT90CAN interfaces with a vehicle CAN network. A MC ... |
Topic: CANsend() hangs during every 2nd call. |
Neill
Replies: 8
Views: 3408
|
Forum: BASCOM-AVR Posted: Sun Sep 03, 2023 5:01 am Subject: CANsend() hangs during every 2nd call. |
I am finding the CANsend() function inconsistent.
I have cut my code down to the bare minimum in order to test this and make it a bit more readable Smile
I have tried many different things, too ... |
Topic: IR over UART ? |
Neill
Replies: 12
Views: 904
|
Forum: BASCOM-AVR Posted: Wed Oct 21, 2015 4:23 am Subject: IR over UART ? |
I think that the best approach would be to use hardware to generate the carrier frequency. Use the serial port pin to modulate an external 38kHz oscillator. It is normal to pulse an IR LED with quite ... |
Topic: Challenge #1: frequency counter code module |
Neill
Replies: 12
Views: 1365
|
Forum: BASCOM-AVR Archive Posted: Tue May 06, 2014 3:50 am Subject: Challenge #1: frequency counter code module |
I'm with Sidknox on this, post #2.
What is the specification fro this counter?
I typically use one of two methods depending on the frequency being measured, basically whether or not a 16 bit tim ... |
Topic: Warning: accessing bit variables are not atomic |
Neill
Replies: 11
Views: 1692
|
Forum: BASCOM-AVR Archive Posted: Thu May 01, 2014 6:04 am Subject: Warning: accessing bit variables are not atomic |
I like to use bits, they can be very useful.
What I do is ensure that each bit has it's own RAM location like this:
DIM tick as bit
DIM dummy_tick_1 as bit
DIM dummy_tick_2 as bit
DIM dummy_t ... |
Topic: Used Registers |
Neill
Replies: 10
Views: 1636
|
Forum: Various Posted: Tue Apr 22, 2014 3:14 am Subject: Used Registers |
I use the AVR Studio software to look at the .obj file that Bascom outputs.
Using Studio you can view your code as assembly language line by line. You will see which registers are manipulated.
... |
Topic: 2077 official release |
Neill
Replies: 23
Views: 3273
|
Forum: BASCOM-AVR Archive Posted: Wed Apr 09, 2014 2:03 am Subject: 2077 official release |
Shout out to Mr Mark Alberts.
Thanks for the new features!!
Yesterday was the first time I got to use 2077 for a few hours.
I really appreciate the indent and explorer features. Certainly sa ... |
Topic: atmega8 to atmega168 porting problem |
Neill
Replies: 15
Views: 2973
|
Forum: AVR Posted: Tue Nov 05, 2013 10:11 am Subject: atmega8 to atmega168 porting problem |
Is it too late to make some changes in hardware? I would use a comparator to generate the interrupt signal, with a crude reference like a Zener on one pin and a Voltage divider from Vcc on the other. ... |
Topic: Problem with bitwise operation inside sub - Please help. |
Neill
Replies: 11
Views: 490
|
Forum: BASCOM-AVR Archive Posted: Fri Aug 16, 2013 11:40 am Subject: Problem with bitwise operation inside sub - Please help. |
I don't like the name of the variables Bit_1 & Bit_2.
Bit is an reserved word and the underscore is used to continue break up a long line.
Maybe the compiler is confused about that.
Edit: T ... |
Topic: Problem with bitwise operation inside sub - Please help. |
Neill
Replies: 11
Views: 490
|
Forum: BASCOM-AVR Archive Posted: Fri Aug 16, 2013 11:30 am Subject: Problem with bitwise operation inside sub - Please help. |
I don't like the name of the variables Bit_1 & Bit_2.
Bit is an reserved word and the underscore is used to continue break up a long line.
Maybe the compiler is confused about that.
Edit: T ... |
Topic: Problem with bitwise operation inside sub - Please help. |
Neill
Replies: 11
Views: 490
|
Forum: BASCOM-AVR Archive Posted: Fri Aug 16, 2013 8:10 am Subject: Problem with bitwise operation inside sub - Please help. |
What happens is that the timing of the pin toggle is not regular when the code is compiled with the line "bit_1 = bit_2" in the sub routine. It seems that the bit "tick" is corrupted. With the line re ... |
Topic: Problem with bitwise operation inside sub - Please help. |
Neill
Replies: 11
Views: 490
|
Forum: BASCOM-AVR Archive Posted: Fri Aug 16, 2013 8:05 am Subject: Problem with bitwise operation inside sub - Please help. |
Its been a while since I wrote some code, so perhaps I'm missing something, but:
1 MHz clock, divided by a Pre-Scaler 0f 1, gives a 1 MHz clock into the Timer/Counter.
Setting the compare value to ... |
Topic: Problem with bitwise operation inside sub - Please help. |
Neill
Replies: 11
Views: 490
|
Forum: BASCOM-AVR Archive Posted: Fri Aug 16, 2013 12:58 am Subject: Problem with bitwise operation inside sub - Please help. |
Hello fellow BASCOM users.
I having one of those "am I going crazy days", actually it has been more than a day....
I'm having trouble with something very simple, but I just cannot work out what ... |
Topic: Tone generation with timers |
Neill
Replies: 5
Views: 467
|
Forum: BASCOM-AVR Archive Posted: Tue Aug 06, 2013 11:13 am Subject: Tone generation with timers |
All you need to do is setup a timer as a...timer.
In this example I used an ATMega32 running the internal 8MHz RC oscillator.
An ATmega32 has a timer 2, you can use any timer you like.
The squa ... |
|