Main Menu
Counter
This page today ...
total: 0
unique: 0

This page ever ...
total: 176
unique: 107

Site ...
total: 2621
unique: 1143
Online
  • Guests: 1
  • Members: 0
  • Newest Member: ole
  • Most ever online: 47
    Guests: 47, Members: 0 on Wednesday 21 February 2018 - 23:52:15
Chatbox
You must be logged in to post comments on this site - please either log in from the Login box or from here.If you are not registered click here to signup.


bullet Kim
1 year ago
test
Royalsystems blog

MCS Electronics Forum

  • BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY



    [quote:a0a527a960="i.dobson"]It could be a timing problem. You might be just inside the limit with your ISP.[/quote:a0a527a960]
    And care has to be taken that soft-serial handling completely within ISR may keep INTF0 set.

    INTF0 is initially cleared by execution of the INT0-vector, but set again by pin-toggling of incoming serial data.
    This leads to another execution of named ISR immediately after leaving it, while then no data is available and it gets stuck.
    Solution is to clear INTF0 just before leaving the ISR by writing an 1 to it.

  • BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY



    Hi,

    It could be a timing problem. You might be just inside the limit with your ISP.

    Regards
    Ian Dobson

  • BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY



    Thanks for the reply, Ian.
    For some reason I can't fathom, the code is now working.
    Sorry for the false alarm.

  • BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY



    Hi,

    Software serial port is just that. Serial communication needs fairly accurate timing to work and if your ISR (interupt handling code) takes too long it could delay the Serial code enough to corrupt communications.

    How long does you ISR run (Show us some code, hint, hint).

    I once wrote a software/interrupt driven serial input (Using a Timer and a Pin Change interrupt). I see if I can find the code when I get home this evening.

    Regards
    Ian Dobson

  • BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : NEWTOPIC



    I'm attempting to use software serial ports and Timer0 in 1 second interrupt mode together in an ATtiny45, but it does not work. They both work separately, but not when combined in the same firmware.
    I vaguely recall seeing somewhere that the two cannot be used at the same time, but I cannot find that article/post anywhere.
    Can someone please advise whether this is correct?

    [b:cf038c20b5][color=red:cf038c20b5](BASCOM-AVR version : 2.0.7.7 , Latest : 2.0.8.1 )[/b:cf038c20b5][/color:cf038c20b5]

  • BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY



    SPI mode should not be affected by baud rate, its a synchronous system ( clock + data ). Unless of course the target slave cant keep up with the clock rate you set.

  • BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY



    Hi MWS,

    Sorry for not replying earlier.

    [img:d5ef001d1d]https://www.mcselec.com/userpix/13930_USARTSPI_2.jpg[/img:d5ef001d1d]

    I'm reasonably certain that all Series A (1 or 3) XMega have the same registers for the USART as Master SPI. The excerpt from the data sheet shows only UDORD as the Reg.Bit that allows for LSB or MSB shifting. I have confirmed that it works.

    I think the problem I'm having is related to matching the Config Baud Rate with Register Values. When a Byte transmitted out, there is some type of problem that I need to understand. Don't know if I'm creating the problem, or if it is Bascom.

    [img:d5ef001d1d]https://www.mcselec.com/userpix/13930_Fper_1.jpg[/img:d5ef001d1d]

    One more note: Bascom allows (without throwing an error):
    [code:1:d5ef001d1d] Config [x]1, 3, 5, 7 = 115200 , Mode = SPI , Parity = None , Stopbits = 1 , Databits = 8[/code:1:d5ef001d1d]
    ... but these do not have underlying SPI capability and will not work.

    Only COM0, 2, 4, 6, 8 have it this capability.

    E

  • BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY



    [quote:7f8a55827f="enniom"]I'm not able to find where this is set.[/quote:7f8a55827f]
    In my code - however for a different processor - I've defined the bit-names myself, if you resolve my constant definitions you get: USARTD0_CTRLC.7 and 6.
    I did not check whether bit-names are equal for xm192a3u, but thought you will look up my used xm128a1d and draw the comparison.

  • BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY



    .

    UPDATE:

    Tried using Synchroneous Mode and all works properly! SPI Mode does not.

    [code:1:dbde596020]Config Com6 = 256000 , Mode = Synchroneous , Parity = None , Stopbits = 1 , Databits = 8
    'Config Com6 = 256000 , Mode = Spi , Parity = None , Stopbits = 1 , Databits = 8
    Open "COM6:" For Binary As #1
    [/code:1:dbde596020]
    The major difference in these is the available maximum speed.

    E

  • BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY



    Is it possible that UDORD is intended to be the bit order?

| Date published: not known
Back to newsfeed list
Welcome
Username or Email:

Password:




[ ]
[ ]
Headlines

»BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY
[quote:a0a527a960="i.dobson"]It could be a timing problem. You might be just inside the limit with your ISP.[/quote:a0a527a960] A...
»BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY
Hi, It could be a timing problem. You might be just inside the limit with your ISP. Regards Ian Dobson
»BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY
Thanks for the reply, Ian. For some reason I can't fathom, the code is now working. Sorry for the false alarm.
»BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : REPLY
Hi, Software serial port is just that. Serial communication needs fairly accurate timing to work and if your ISR (interupt hand...
»BASCOM-AVR : Using software serial and Timer0 interrupt together on ATtin : NEWTOPIC
I'm attempting to use software serial ports and Timer0 in 1 second interrupt mode together in an ATtiny45, but it does not work. ...
»BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY
SPI mode should not be affected by baud rate, its a synchronous system ( clock + data ). Unless of course the target slave cant k...
»BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY
Hi MWS, Sorry for not replying earlier. [img:d5ef001d1d]https://www.mcselec.com/userpix/13930_USARTSPI_2.jpg[/img:d5ef001d1d...
»BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY
[quote:7f8a55827f="enniom"]I'm not able to find where this is set.[/quote:7f8a55827f] In my code - however for a different proces...
»BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY
. UPDATE: Tried using Synchroneous Mode and all works properly! SPI Mode does not. [code:1:dbde596020]Config Com6 = 2560...
»BASCOM-AVR : USART as Master SPI - What is bit sequence? : REPLY
Is it possible that UDORD is intended to be the bit order?


Date published: not known
Details

»ADC und ATMega8
Hallo, ich messe mit einem ATMega8 Temperaturen. Beim Erreichen einer gewissen Schwelle wird eine Aktion über ein Relais ausgeführt. Als Anzeige v...
»ATtiny85 Blinker
bascomforum.de/index.php?attachment/1656/bascomforum.de/index.php?attachment/1657/bascomforum.de/index.php?attachment/1658/ Hallo, ich möchte Euch...
»PG-12864-D will nicht frown
Hallo Bascomfreunde, ich habe ein Problem mit oben genannten Grafik LCD. Im Ebay für wenig Geld geschossen und zu Hause gesehen das es ein PG12864D...
»LCD Klartext U, I, P und Ah messen
Hallo Bascom Freunde! Ergänzend zum Beitrag "2 Displays (a 8 Stellen mit max7219 betreiben) das ich erst letztens vorgestellt habe, passt dieses "...
»DCF77-Empfänger von Conrad
Hat jemand Erfahrung mit den DCF77-Empfängern von Conrad? Ich hab zwei Stück davon da und habe das Gefühl, dass die nicht so richtig empfangen. Mal...
»attiny861 und timer0
Ich wollte auf die Schnelle eine Kurzzeituhr bauen, habe aber Probleme. Ähnliches, allerdings mit anderem MC und anderer Anzeige, habe ich schon me...


Date published: Thu, 19 Apr 2018 18:16:28 +0000
Details

»93c46 editor programmer bascom & vb93c46 editor programmer bascom & vb
»93c46 Bascom & VB693c46 Bascom & VB6
»Analog clock on SSD1289 3.2" 240x320 lcdAnalog clock on SSD1289 3.2" 240x320 lcd
»Nextion HMI lcd with KaraDio the best webradio esp8266Nextion HMI lcd with KaraDio the best webradio esp8266
»Adding 240x320 lcd to the WifiWebRadioAdding 240x320 lcd to the WifiWebRadio
»IV-17 Nixie clock GPS set time & date at power onIV-17 Nixie clock GPS set time & date at power on


Date published: not known
Details

»Bascom Can Bus Sniffer
»R.I.P Ben Zijlstra
Remembering Ben Zijlstra We hope that people who love Ben will remember and celebrate his life. more info at MCS www.mcselec.com/index2.ph...
»KaRadio webradio ESP8266
The Dimitris board is available at https://github.com/dsaltas/WiFi-WebRadio  This is a hardware project for Ka-Radio
»93C46
small tool to edit 93C46 eeprom written in BascomAVR & VB  Bascom control the 93C46 so we sent data via comport from VB code will be added later ...
»nRF24L01+ RC Controller
This is a RC controller TX & RX unit with nRF24L01+ nRF24L01+ / with PA and LNA for longer range facts: TX 1 x potmeter for servo ...
»RAW lcd
Connecting RAW lcd to atmega8 the lcd is 6 digit + time glass LCD Hour Meter for  tractor ,air compressor, ect the lcd have 4 com pins  & 14...


Date published: not known
Details


Proudly powered by e107 which is released under the terms of the GNU GPL License.